Question: 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

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.TXT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!