Create a class called class to represent a class of


Create a class called Class to represent a class of students. The class should store the name of the class (Biology, History, etc), the name of the instructor, the number of students, the average GPA of the students in the class, and finally the students in an array of Student objects.

Be sure to include at least the following methods:

1. Constructor that sets the class name and the instructor's name. Initialize the student array to hold 5 students to start.

2. addStudent - Adds a student to the class. Make sure there is enough room in the array for the student before adding. If there is not enough room, expand the array then add the student.

3. removeStudent - Removes a student from the class. Have the user enter a number and remove the student at that index. After removing the student, shift the other students to fill in the gap in the array.

4. calculateAverageGPA - Iterate through the students and calculate the average GPA.

5. printRoster - Print out a roster of all the students in the class. Hint - this can be done very easily by taking advantage of the toString method in the Student class.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a class called class to represent a class of
Reference No:- TGS01009625

Expected delivery within 24 Hours