Hey Guys I have this program below written. I want to change it so the array size isn't fixed but rather automatically increase the array size by creating a new larger array and copying contents of the current array to it. I also want to implement the dropStudent method and add a new method named clear() that removes all students from the course. Write a test program that creates a course, adds three students, removes one and displays the students in the course. Thank you in advance for your help I'm more of a Python programmer and new to Java!
public class Course {
private String courseName;
private String[] students = new String[100];
private int numberOfStudents;
public Course(String courseName) {
this.courseName = courseName;
}
public void addStudent(String student) {
students[numberOfStudents] = student;
numberOfStudents++;
}
public String[] getStudents() {
return students;
}
public int getNumberOfStudents() {
return numberOfStudents;
}
public String getCourseName() {
return courseName;
}
public void dropStudent(String student) {
// Left as an exercise in Exercise 9.9
}
}