Question: (DON'T use ArrayList) The array size is fixed in Listing 10.6. Improve it to automatically increase the array size by creating a new larger


 

(DON'T use ArrayList) The array size is fixed in Listing 10.6. Improve

it to automatically increase the array size by creating a new larger

array and copying the contents of the current array to it. (default

capacity = 16, increased the size of array to the double if

 

(DON'T use ArrayList) The array size is fixed in Listing 10.6. Improve it to automatically increase the array size by creating a new larger array and copying the contents of the current array to it. (default capacity = 16, increased the size of array to the double if necessary) Implement the dropStudent method. If the student to be dropped can't be found, do nothing. Add the instructor's information into the class. Add a method, clear(), removes all students from the course. Add a method, print(), displays course information with the Course Name, Instructor's name, the number of students enrolled, and the list of students' names. Write a test program (Assignment 5.java) that creates a course with default capacity, adds twenty students, removes three, adds another two, then displays the course info. Call clear() and display the course info again. Submit your source codes (Course.java and Assignment5.java) and screenshots at Canvas. Late penalty: 5 points off for each day late. 5-point off for the resubmission after grading. The resubmission should be made within 2-days after grading to avoid additional late penalty. Comment your name and ID in the first line of each source file. UML diagram: UML diagram: Course courseName: String instructor: String studentList: String[] capacity: int numberOfStudents: int + Course(name: String) + Course(name: String, instuctor: String) +getCourseName(): String + setInstructor( instructor: String): void +getInstructor(): String + addStudent( student: String): void + dropStudent(student: String): void +getStudents(): string[] +getNumberOfStudents(): int +print(): void + clear(): void Sample but Sample output LabExercise3 [Java Application] /Library/Java/JavaVirtual Machines/jdk1.8.0_181.jd **Kim Smith was added into COMSC255: Programming with Java **Paul Young was added into COMSC255: Programming with Java **Sarah Lo was added into COMSC255: Programming with Java **Ethan Chiang was added into COMSC255: Programming with Java **John Smith was added into COMSC255: Programming with Java **Debbie White was added into COMSC255: Programming with Java **Snow White was added into COMSC255: Programming with Java **Jeff Black was added into COMSC255: Programming with Java **Tiffany Young was added into COMSC255: Programming with Java **Ed Shreena was added into COMSC255: Programming with Java **Helena Orchid was added into COMSC255: Programming with Java **Mary Brown was added into COMSC255: Programming with Java **Tim Hazz was added into COMSC255: Programming with Java **Reed Heart was added into COMSC255: Programming with Java **Edward Johnson was added into COMSC255: Programming with Java **Taylor Swift was added into COMSC255: Programming with Java **Sawyer Fredericks was added into COMSC255: Programming with Java **David Brownworth was added into COMSC255: Programming with Java **James Allen was added into COMSC255: Programming with Java **Hugh Jackson was added into COMSC255: Programming with Java ##Ed Shreena was dropped from COMSC255: Programming with Java ##Tim Hazz was dropped from COMSC255: Programming with Java ##James Allen was dropped from COMSC255: Programming with Java **Bradly Cooper was added into COMSC255: Programming with Java **Eddie Walter was added into COMSC255: Programming with Java Course Name: COMSC255: Programming with Java Instructor Name: Laura lo **Reed Heart was added into COMSC255: Programming with Java **Edward Johnson was added into COMSC255: Programming with Java **Taylor Swift was added into COMSC255: Programming with Java **Sawyer Fredericks was added into COMSC255: Programming with Java **David Brownworth was added into COMSC255: Programming with Java **James Allen was added into COMSC255: Programming with Java **Hugh Jackson was added into COMSC255: Programming with Java ##Ed Shreena was dropped from COMSC255: Programming with Java ##Tim Hazz was dropped from COMSC255: Programming with Java ##James Allen was dropped from COMSC255: Programming with Java **Bradly Cooper was added into COMSC255: Programming with Java **Eddie Walter was added into COMSC255: Programming with Java ======: Course Name: COMSC255: Programming with Java Instructor Name: Laura Lo There is(are) 19 student(s) enrolled. The list of students: Kim Smith Paul Young Sarah Lo Ethan Chiang John Smith ======= Debbie White Snow White Jeff Black Tiffany Young Helena Orchid Mary Brown Reed Heart Edward Johnson Taylor Swift Sawyer Fredericks David Brownworth Hugh Jackson Bradly Cooper Eddie Walter Students' list after call clear() ======== Course Name: COMSC255: Programming with Java Instructor Name: Laura Lo There is(are) 0 student(s) enrolled.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To implement this Java program we will create two classes Coursejava and Assignment5java Heres the implementation Coursejava java Coursejava Your Name Your ID public class Course private String course... View full answer

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!