Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that achieves the following requirements: 1) The program should prompt the user to enter: The number of students they wish to register.

Write a program that achieves the following requirements: 1) The program should prompt the user to enter: The number of students they wish to register. The student ID for each student. Student IDs are 5-digit integers, i.e. 45234. 2) Students should be stored in their own array. 3) The program then should prompt the user to enter: The number of courses offered. The course code of each of these courses. Course codes are 7-digit alphanumeric strings, i.e. CST8234. 4) Courses should be stored in their own array. 5) The program then should prompt the user to choose one of three actions: Register a student into a course. Drop a student from a course Display Registration table. 6) If the user chooses to register a student or drop a student, then the program should prompt for the student ID first then the course code second, and perform the correct action as follows: Validate the student ID as entered by the user. Display an appropriate error message if the student ID is not found and re-prompt the user for a valid student ID. Validate the course code as entered by the user. Display an appropriate error message if the course code is not found and re-prompt the user for a valid course code. Registering a valid student will update the registration table by adding 1 (i.e. true) to the element with the [student index][course index] element. Dropping an existing course will update the registration table by adding 0 (i.e. false) to the element with the [student index][course index] element. 7) If the user chooses to display the registration table, the program should print all entries in the table. 8) Additional requirements: Add another action to the menu that will allow the user to quit the program by choosing the quit action. The program would loop until the user quits the program. The program will loop only starting from point 5 above, so the user doesnt need to enter the students or the courses information anymore. Validate the menu action as entered by the user. Display an appropriate error message if the menu action is not found and re-prompt for a valid menu action. 9) Make sure you use functions, design your program to separate functionality into its own functions. Using only the main function will make you lose points. The .c files should contain functions that represent sensible groupings of functionality You must define .h files as appropriate. 10) Give your functions and variables a descriptive name. For example, students[], not x[]. 11) Write a program that will implement ALL the requirements, explicit and implicit, listed above. 12) Each function must have header comments that explain what it does, and describe/explain its inputs (if any) and return value (if any) 13) You must use a makefile, with the CC_FLAGS set to -g ansi pedantic Wall w), and OUT_EXE set to labAssessment#...... I try to do it but I didn't complete I am facing a lot of problems that is why I need help to complete this code. Please help me. I would really appreciate it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions