Question: Write a C++ program that can maintain grades for a simple course. Functional requirements Your program will be command driven. It will repeatedly print a
Write a C++ program that can maintain grades for a simple course.
Functional requirements
Your program will be command driven. It will repeatedly print a prompt, read a command, the execute a command. Grade information is stored in a text file name grades.txt, located in the same directory as the executable. The course is assumed to have exams and assignments, each worth 50% of the grade. Within a category, all entries are weighted equally. All updates should be saved to the file after each command.
q
Quit the program.
addS
Add a new student. If a student of that name already exists an error message is displayed and no changes are made.
addA
Add a new assignment. Assignments are not named, they are indexed starting at 1.
addE
Add a new exam. Exams are not named, they are indexed starting at 1.
grade
For each assignment, display the student's grade and prompt for a new grade. If no grade has been entered a 0 is displayed for the current grade. If the user enters no data the current grade is kept. If an invalid grade is given (outside of 0-100, oir non-numeric), the program reprompts.
Then repeat the process for each exam.
gradeA
For each student prompt for that student's grade on the given assignment.
gradeE
For each student prompt for that student's grade on the given exam.
display
Print a table of all entered grades, with the overall grade displayed in the right-most column.
EXAMPLE
Student Test1 Test2 Assignment 1 Assignment 2 Average Grade
0 0 0 0 F
0 0 0 0 F
Class Average = 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
