Problem : Suppose at the end of the semester, there is a file “scores.dat” recording scores each student
has earned so far from closed lab assignments (CLA), open lab assignments (OLA), quizzes, exams,
and final exam score. You can assume there are no more than 30 students. The final letter grade is
decided according to the following table based on the total points they have earned:
Total Points Final Letter Grade Total Points Final Letter Grade
>=90 A >=70, but <73 C-
>=87, but <90 B+ >=67, but <70 D+
>=83, but <87 B >=63, but <67 D
>=80, but <83 B- >=60, but <63 D-
>=77, but <80 C+ <60 F
>=73, but <77 C
In this assignment, you are asked to write a program to calculate student final letter grades as well as
the average and highest scores of CLA, OLA, quizzes, exams, and final exam scores. The final result
should be printed to the screen (standard output).
Requirements:
• At the beginning of the program, your program should give the user a prompt for the name of
the data file which contains the records of student grades.
o If file does not exist, print error message and keep asking the user to enter another file
name.
• Define a Student structure, which includes student id, scores for CLA, OLA, quizzes, exams,
final scores, total points, and letter grade.
• Define an array of Student to hold information of all students.
• Define a 1-dimensional array to store the average scores of each category.
• Define a 1-dimensional array to store the highest scores of each category.
• Functions you may need to define:
o readStudentRecord: Reading student records from a file and saving them to an array
of Student
o calculateTotalPoints: Given a student record, calculating his/her total points
o findLetterGrade: Given a total points value, find and return the corresponding final
letter grade
o calculateAverage: Calculating the average scores for each category
o calculateHighest: Calculating the highest scores for each category
o printData: Printing student information, average, and highest scores of each category.
• No global variables are allowed.
this is data table
ID CLA OLA Quiz Exam Final Total FinalGrade
c088801 10 20 5 40 25
c088802 9 12 2 31 16
c088803 8 20 3 35 20
c088804 7 18 4 36 23
c088805 3 11 4 39 25
c088806 8 17 4 36 22
c088807 4 12 4 32 18
c088808 10 17 5 31 16
c088809 8 8 3 31 19
c088810 6 9 4 39 23
c088811 8 7 5 33 21
c088812 4 11 3 31 17
c088813 9 15 2 38 20
c088814 8 12 4 20 18
c088815 6 8 1 7 15
c088816 7 17 4 36 21
c088817 8 9 2 32 18
c088818 6 18 3 37 15
c088819 7 17 4 36 23
c088820 8 19 4 35 20
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more