Hello,

I need help in this question in **Java**,

** Redo Task 3 of assignment 4 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.

__This is Task 3:__

__Task 3: __

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:

Dr. Hassan Salamy Page 2

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.

**I have attache the snapshot of the out put as well as the answer without using objects.**

**I need the same output, just I need to redo this task using objects as mentioned at the beginning**

#### Top Answer

Please find the solution file attached below. If... View the full answer