import java.awt.List;
import java.util.ArrayList;
public interface Person{
public String getName();
}
public class Course{
private ArrayList students = new ArrayList();
public addStudent(student: Student){
}
public void getNumberOfStudents(){
}
}
visibillity seems not to be clear to you. Please read on that issue.
Is the interface demanded? This
homework
normally comes without interfaces.
The member variable
teacher
is missing on the object
course
.
Where is the controlling class (the one with the main method) ?