Question: 2. [10 points] Re-code the Course class, whose UML diagram is as follows.-courseName: String students: String[] Course-numberOfStudents: int +Course(courseName: String) +getCourseName(): String +addStudent(student: String): void

2. [10 points] Re-code the Course class, whose UML diagram is as follows.-courseName: String students: String[] Course-numberOfStudents: int +Course(courseName: String) +getCourseName(): String +addStudent(student: String): void +dropStudent(student: String): void +getStudents(): String[] +getNumberOfStudents(): int Use an ArrayList to replace an array to store students. You should not change the original contract of the Course class (i.e., the definition of the constructors and methods should not be changed, but the private members may be changed.)

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!