Question: ( The Course class ) Revise the Course class as follows: ( DON ' T use ArrayList ) The array size is fixed in Listing
The Course class
Revise the Course class as follows:
DONT use ArrayList
The array size is fixed in Listing Course.java Improve it to automatically increase the array size by creating a new larger array and copying the
contents of the current array to itdefault capacity 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 Assignmentjava 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 Coursejava and Assignmentjava and screenshots at Canvas.
Late penalty: points off for each day late. point off for the resubmission after grading. The resubmission should be made within days after grading to
avoid additional late penalty.
Comment your name and ID in the first line of each source file.UML diagram:
Course
courseName: String
instructor: String
studentList: String
capacity: int
numberOfStudents: int
Coursename: String
Coursename: String, instuctor: String
getCourseName: String
setInstructorinstructor: String: void
getInstructor: String
addStudent student: String: void
dropStudentstudent: String: void
getStudents: string
getNumberOfStudents: int
print: void
clear: voidSample output
backage Module;
public class Course
private String courseName;
private String students new String ;
private int numberofStudents;
public CourseString courseName
this. courseName courseName;
public void addStudentString student
students numberofStudents student;
numberfStudents;
public String getStudents
return students;
public int getNumberofStudents
return numberofStudents;
public String getCourseName
return courseName;
public void dropStudentString student
Left as an exercise in Exercise
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
