Is there a way to create getters and setters for these array of objects? I also have two methods to add these ships to the array of objects. One of them looks like. Is this the write way?
`public class College
{
private Student[] student;
private Teacher[] teacher;
int count;
public College()
{
student = new Student[9];
teacher = new Teacher[9];
count = 0;
}
public Student[] getStudent()
{
return student;
}
public void setStudent(Student[] student)
{
this.student = student;
}
ArrayList, and then simply return an iterableListcollection to the caller.