Question: CodeHS - Teacher Class List Methods JAVA Now that the classList Array has been implemented, we need to create methods to access the list items.

CodeHS - Teacher Class List Methods JAVA
Now that the classList Array has been implemented, we need to create methods to access the list items.
Create the following static methods for the Student class:
getLastStudent()- returns the name of the last student in the classList array.
getClassSize()- returns the size of the classList
addStudent(int index, Student student)- adds a new student to the classList at index index. This method is a little tricky - when the new Student is added to the class, it will create a duplicate value classList because of our Student constructor. This method should also include a command to remove the extra Student in the classList added to the end.
getStudent(int index)- returns the name of a student at the index specified.
 CodeHS - Teacher Class List Methods JAVA Now that the classList

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!