Question: Write a menu driven C program, for manipulating the records of students in a classroom. The class may include at most 25 students. Using unions
Write a menu driven C program, for manipulating the records of students in a classroom. The class may include at most 25 students. Using unions and enumerated data types, define a structure for students with different majors. Each student should have a student name, student ID, student major (Biology, Mathematics, or Chemistry), and student average. If the student has a Biology major, then they should have marks for 106 and one for 206. Those having a Mathematics major should have marks for 101 and 102. Those with a Chemistry major should have marks for 101, 102, and 113. Your program should contain proper functions to perform the following menu options: Add a new student to the classroom. Delete a student from the classroom. Modify the record of a particular student given his name or ID number. Print the record of a particular student given his name or ID number. Print the records of all the students in the classroom. Exit the program. Remarks: When adding a new student, your program should input a student name and their ID, enter their major along with the marks needed according to the major, and then compute the average according to the marks stored in the structure. Only one student is added with each add option. No two students share the exact name. No two students share the exact ID number. Search for the student using a recursive sequential search algorithm to make sure if they exist. The user is allowed to delete a student based on either the student's unique name or ID number. The order of the students in the array should not be changed. Use shifting within the array to shift the elements so as to delete the unwanted student from the array. The user can modify the marks of the student given his name or ID number. The marks modified are dependent on the major of the student. Make sure to recalculate the average after the modification. Implement a recursive function to print the records of all the students in the classroom. Make sure all error messages are accounted for (e.g. printing the students from an empty list, deleting a non-existing student, etc.) Follow good programming style: Meaning variable names Comments Indentations
(in C programing language)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
