t will include the first name, id, five quiz scores, two exam scores, and one final exam score. For each student record, your program should determine the numeric average and letter grade using the following policies: a. Each quiz is
For this project, you will develop a program named project1.cpp to determine the final scores, letter grades, and rankings of all students in a course. All records of the course will be stored in an input file, and a record of each student will include the first name, id, five quiz scores, two exam scores, and one final exam score. For each student record, your program should determine the numeric average and letter grade using the following policies: a. Each quiz is graded on the basis of 10 points. Among the five quizzes, discard the lowest score and use the remaining four scores for the grade calculation. b. Each exam is graded on the basis of 100 points. c. The final exam is graded on the basis of 100 points. d. For the numeric average, the final exam counts for 40 percent, midterms count for 40 percent, and quizzes count for 20 percent, respectively. Any average of 90 or more is an ‘A’, any average of 80 or more (but less than 90) is a ‘B’, any average of 70 or more (but less than 80) is a ‘C’, any average of 60 or more (but less than 70) is a ‘D’, and any average below 60 is a ‘F’, In this project, your program should ask a user for an input file name. Then, it should read the data into your program and store them in a
So, you will take the information for each student in the file and calculate the numeric average,
letter grade, and ranking of each student.
Here is an example of how you would do the calculation for the following record:
Cati 1000 9.5 9.0 8.5 8.0 8.5 87.0 92.5 86.0
The lowest quiz is 8.0, so the quiz average would be:
(9.5 + 9.0 + 8.5 + 8.5) / 4.0 = 8.875 * 10 = 88.75
The first midterm average:
87.0
The second midterm average:
92.5
The final average:
86.0
Final course average would be:
Quizzes: 20% Exam 1: 20% Exam 2: 20% Final: 40%
88.75 * .20 + 87.0 * 0.20 + 92.5 * 0.20 + 86.0 * .40 = 88.05
After that, your program should display a menu that allows you to print out course report
information. Those options will be:
1. A course report in order of numeric averages (If students have the same average, you
want to print out the student with the lowest ID number first)
2. A course report in order of first names (If students have the same name, you want to print
out the student with the lowest ID number first)
3. The statistics of the class, such as the number of students in the course, the average of all
numeric grades, and the distribution of each letter grade. When you display the
distribution of letter grades, you should use a histogram as shown in the sample result
below.
4. The last option will be a “record finding” function. In other words, if a user enters a first
name, your program should provide information about the student if a student with that
name exists. If there are several students with the same name, your program should
display all their records.
Sample Input File
The following presents a sample input data file.
Sarah 1000 9.5 9.0 8.5 8.0 8.5 87.0 92.5 86.0
Ana 2000 10.0 6.7 10.0 10.0 10.0 100.0 100.0 100.0
Lee 3000 6.9 8.0 8.0 8.0 8.0 80.0 80.0 80.0
Ana 1500 8.0 9.0 7.0 6.5 8.0 83.0 77.0 80.0
Diego 2500 5.0 5.0 5.0 3.5 5.0 50.0 50.0 50.0
CSS 2A Page 2 of 6
Project 1
CSS 2A
Sample Run
A sample run of your program should look like below. Note that the user’s inputs are highlighted in
bold.
Enter an input file: proj1_test_case.txt
--------------------------------------------------
Course Report Options
--------------------------------------------------
1. Print in numerical average order
2. Print in first name order
3. Print course statistics
4. Record Finder
Choose any other option to quit.
--------------------------------------------------
Selection: 2
-------------------------------------------------
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images