|
@ -14,6 +14,38 @@ public class Administration { |
|
|
private List<Course> courses; |
|
|
private List<Course> courses; |
|
|
Scanner scanner = new Scanner(System.in); |
|
|
Scanner scanner = new Scanner(System.in); |
|
|
|
|
|
|
|
|
|
|
|
public List<Professor> getProfessors() { |
|
|
|
|
|
return professors; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setProfessors(List<Professor> professors) { |
|
|
|
|
|
this.professors = professors; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<Admin> getAdmins() { |
|
|
|
|
|
return admins; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setAdmins(List<Admin> admins) { |
|
|
|
|
|
this.admins = admins; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<Student> getStudents() { |
|
|
|
|
|
return students; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setStudents(List<Student> students) { |
|
|
|
|
|
this.students = students; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<Course> getCourses() { |
|
|
|
|
|
return courses; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setCourses(List<Course> courses) { |
|
|
|
|
|
this.courses = courses; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Constructor |
|
|
* Constructor |
|
|
*/ |
|
|
*/ |
|
@ -355,6 +387,25 @@ public class Administration { |
|
|
} |
|
|
} |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
public void initializeDummyData(){ |
|
|
|
|
|
Student student1 = new Student("Mark", "S1001", "Student"); |
|
|
|
|
|
Student student2 = new Student("Gustavo", "S1002", "Student"); |
|
|
|
|
|
this.addStudents(student1); |
|
|
|
|
|
this.addStudents(student2); |
|
|
|
|
|
Professor prof1 = new Professor("Joachim", "P1001", "Professor"); |
|
|
|
|
|
Professor prof2 = new Professor("Herbert", "P1002", "Professor"); |
|
|
|
|
|
this.addProfessor(prof1); |
|
|
|
|
|
this.addProfessor(prof2); |
|
|
|
|
|
Admin admin1 = new Admin ("Peter", "A1001", "Admin"); |
|
|
|
|
|
Admin admin2 = new Admin ("Martin", "A1002", "Admin"); |
|
|
|
|
|
this.addAdmin(admin1); |
|
|
|
|
|
this.addAdmin(admin2); |
|
|
|
|
|
Course course1 = new Course("MathDUMMY", "CDUMMY1", 5); |
|
|
|
|
|
Course course2 = new Course("EnglishDUMMY", "CDUMMY2", 6); |
|
|
|
|
|
this.addCourse(course1); |
|
|
|
|
|
this.addCourse(course2); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|