Skip to content

This program modifies the registration system from parts 1 and 2 by splitting the program into two source files and one header file, following modular programming principles.

Notifications You must be signed in to change notification settings

C-Coding-Assignments/Student-Registration-Queue-Part-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Student Registration Program 📋

This program modifies the registration system from parts 1 and 2 by splitting the program into two source files and one header file, following modular programming principles.


Table of Contents 📖

Task 🛠️

Modify the registration program from Project 9 by splitting the program into two source files and one header file:

  • student.c: Contains all functions related to operations on the list of students.
  • student.h: Contains the student structure declaration and function prototypes for the functions in student.c, enclosed in an #ifndef-#endif pair to protect the file.
  • student_registration.c: Contains the main function.
You are allowed to modify all parts of the program.


Input and Output 🖥️

Input

  • User inputs an operation code for various actions like adding a student, removing a student, or listing students.
  • The program prompts the user for the student's name, NetID, grade in COP2510, GPA, and the number of previous attempts as necessary.

Output

  • Output will be the list of students in the queue based on the current operation.
  • The program will output a formatted table listing students when requested.

Examples 📋

Example Input

Enter operation code: a
Enter the name of the student: Mauricio Pamplona
Enter the NetID of the student: mauriciop
Enter the COP2510 letter grade: B
Enter the GPA: 2.5
Enter the number of previous attempts: 2

Enter operation code: a
Enter the name of the student: Jing Wang
Enter the NetID of the student: jw
Enter the COP2510 letter grade: A
Enter the GPA: 3.5
Enter the number of previous attempts: 1

Enter operation code: l<br>
|----------------------|----------------------|---------|-----|----------|
| Name                 | NetID                | COP2510 | GPA | Attempts |
|----------------------|----------------------|---------|-----|----------|
| Mauricio Pamplona    | mauriciop            | B       | 2.5 | 2        |
|----------------------|----------------------|---------|-----|----------|
| Jing Wang            | jw                   | A       | 3.5 | 1        |
|----------------------|----------------------|---------|-----|----------|

Explanation:

  • The program adds students to the list and lists them after an 'a' operation and the 'l' operation is called to list all students in the queue.

Requirements ✔️

  1. The program should be split into three files: student.c, student.h, and project10_registration.c.
  2. student.c should contain functions related to operations on the list of students.
  3. student.h should contain the student structure and the function prototypes for functions in student.c, with appropriate use of #ifndef-#endif guards.
  4. project10_registration.c should contain the main function.
  5. The program should compile correctly when the files are split as described.

Usage 🚀

1. Compile the Program:

gcc -o registration student_registration.c student.c

2. Run the Program:

./registration

3. Input Required:

  • Choose an operation code (e.g., 'a' for adding a student, 'p' for popping a student).
  • Provide the necessary details depending on the operation selected (student name, NetID, etc.).

About

This program modifies the registration system from parts 1 and 2 by splitting the program into two source files and one header file, following modular programming principles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages