Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ is the Language of the Program. Write a program that will encode the grades of the students in a class using the following requirements:
C++ is the Language of the Program.
Write a program that will encode the grades of the students in a class using the following requirements: 1. First, the program should ask how many students in a class. The Maximum number of students should not exceed 15 students and should not be less than 3 students, otherwise the program should ask again for a valid number of students. 2. Second, the program should accept grades ONLY for the MIDTERM and the FINALS GRADES of EACH of the Students. Grades should not be lower than 70 and should not be more than 100. 3. Third, the program should ask for the LAST NAME and FIRST NAME of EACH of the students. Follow the order, last name first then the first name. 4. Fourth, the program should compute the FINAL GRADE of EACH of the Students following the FORMULA: 40% Midterm and 60% Finals. Final Grade = 40% * Midterm Grade + 60% * Finals Grade. 5. Fifth, the program should CREATE and SAVE the RECORD of the STUDENTS in a TEXT FILE. The file should be ARRANGED (SORTED) according to the LAST NAME of the students in ASCENDING order (A to Z). Name the TEXT FILE the filename: SortedByName.TXT 6. Sixth, the program should CREATE and SAVE another RECORD of the STUDENTS in a TEXT FILE but this time it should be ARRANGED (SORTED) according to the FINAL GRADES of the Students in DESCENDING ORDER from HIGHEST score to the LOWEST score). Name the TEXT FILE the filename: SortedByGrades.TXTStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started