Question: Write a program that will ask the user how many students they will be creating. The program will then define an array of that size,

Write a program that will ask the user how many students they will be creating. The program will then define an array of that size, and will create a loop that will run that many times.
Additionally, another loop will iterate through the array to find the student with the highest gpa, the lowest gpa, and the average gpa of all the students.
Define a Student domain class with the following attributes: first name, last name, panther id, gpa
(Be sure to include the constructor, getters, and setters, toString methods)
Then, create a driver class called FIURegistrar whose main method will call 2 methods:
1.) createArrayOfStudents() which will return an array of populated Student objects using a for-loop to create student objects.
2.) processArrayOfStudents() which will receive the array of Student objects as an input parameter, and will loop through them to find the student with the highest gpa, the student with the lowest gpa, and calculate the average of all gpas. Try to use only 1 loop to iterate through the array to find highest, lowest and avg. Also, in the same loop, print each student object.
3.) In a separate loop, iterate through the entire array and print all the students that scored above the average gpa. Precede this list with a title "Students that have an above average gpa".
In FIURegistrar, define the createArrayOfStudents() method:
0.) Ask the user how many students they wish to process, and define an array of that size.
1.) Use a for loop to
a.) ask the user to supply the last and first name of a student, the panther id, and the gpa
b.) create a Student object from the provided data
c.) add a Student object into the array of Students
2.) Return the array of student objects
This criterion is linked to a Learning OutcomeIn FIURegistrar, define the processArrayOfStudents() method:
1.) Receives the array of Student objects as parameter
2.) Uses a for-loop to iterate through array of Student objects, to compare each student object to a max, min gpa, and to accumulate into a sumGPA
3.) After the end of the loop, calculate the average of the gpa dividing the sumGPA by the total number of students, and display it.
4.) Also after the end of the loop, display the student with the lowest gpa, and the student with the highest gpa.
5.) Within the same loop print each student's info (hint: use toString).
This criterion is linked to a Learning OutcomeComments
Add a standard comment block at the beginning of the classes, and before each method in each class.
This criterion is linked to a Learning OutcomeExtra Credit: Use JOptionPane instead of Scanner & System.out.println
This criterion is linked to a Learning OutcomeFind all students with gpa above average gpa
At the end of printing the student with the highest and lowest gpa, create another loop to print all the students with gpa above the average. Print a title before the list.
This criterion is linked to a Learning OutcomeExtra Credit: Additional Validation, 25 points
Add validation for GPA, such that it must be a positive number between 0 and 4.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!