Write a program that calculates the total average of each


Write a program that calculates the total average of each student in a class along with his/her letter grade and then displays information about the student with the highest score and the student with the lowest score and displays the list of all the students along with their exam scores, their total average and their corresponding letter grade.  The program should also output the average of each test and the final average of the class. 

Assume ten students in the class, declare the following inputs:

  1. An array that holds the last names of the students.
  2. An array to hold the first names of the students.
  3. An Array for the grades of Test 1 for each student.
  4. An Array for the grades of Test 2 for each student.
  5. An Array for the final exam grades for each student. 

To calculate the letter grades: 

1. First write a method the finds the total average of each student assuming the weight for the final exam is 45%, and a weight of 25 % for the minimum grade between tests 1 and 2 and 30% for the test with the higher grades between Tests 1 and 2. 

2. Based on the total average, write a method that finds the letter grade as follows:

  • A if 90<= Total Average <=100.
  • B if 80<= Total Average <90.
  • C if 70<= Total Average <80.
  • D if 60<= Total Average <70.
  • F if Total Average <60. 

To display the required output: 

1. Write a method that calculates and displays the averages for Test 1, Test 2 and the Final Exam as well as the class average. 

2. Write a method that finds the student with the highest average and displays the information about the student in the following order: 

Last name, First name, Test 1 score, Test 2 Score, Final Exam score, Total average, Letter grade. 

3. Write a method that finds the student with the lowest average and displays the information about the student in the following order: 

Last name, First name, Test 1 score, Test 2 Score, Final Exam score, Total average, Letter grade 

4. Write a method that displays the information about all the students in the form: 

Last name, First name, Test 1 score, Test 2 Score, Final Exam score, Total average, Letter grade. 

Use the following table as your input.

Last Name

First name

Test 1

Test 2

Final Exam

Sal1

Has1

96

73

85

Sal2

Has2

73

89

69

Sal3

Has3

89

70

71

Sal4

Has4

83

63

30

Sal5

Has5

31

52

50

Sal6

Has6

77

87

94

Sal7

Has7

92

61

80

Sal8

Has8

87

83

91

Sal9

Has9

85

94

72

Sal10

Has10

45

97

67

Final Step:

Redo the task using objects.  You need to create a class named Student that has the appropriate data fields and methods. Example of methods in class Student are StudentAverage to find the average of each student and StudentLetterGrade to find the corresponding letter grade of the student.  To cover all the students in the class, create an array of objects where each object is a student.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program that calculates the total average of each
Reference No:- TGS01397147

Now Priced at $40 (50% Discount)

Recommended (95%)

Rated (4.7/5)