Java
Create a class called Student that contains:
- A field to store the name
- A field to store their average numerical grade
- A field to store their letter grade
- A constructor that sets the information in all the fields
- Appropriate accessor methods
Write a main class that asks the user the number of students in the class (n). Then prompt for the information for all students and create a Student object for each one. Use an ArrayList to store all the Student objects created.
After all the data is entered, display a neatly formatted gradebook, with the averages rounded to 1 decimal place:
Example Output:
Name | Average | Grade
Stew Dent | 78.3 | C
Joe Schmoe | 91.1 | A
.
.
.
...up to n students
Assume 20 for the maximum length of the name.