Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Revise the Course class as follows:Revise the getStudents ( ) method to return an array whose length is the same as the number of students
Revise the Course class as follows:Revise the getStudents method to return an array whose length is the same as the number of students in the course. Hint: create a new array and copy students to itThe array size is fixed in Listing Revise the addStudent method to automatically increase the array size if there is no room to add more students.This is done by creating a new larger array and copying the contents of the current array to itImplement the dropStudent method.Add a new method named clear that removes all students from the course.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started