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

profileadelen
 (Not rated)
 (Not rated)
Chat

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 (Use the student class from chapter 5).
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.

    • 11 years ago
    the answer 100 % correct answer. in java
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      code_in_java.zip