diff --git a/src/main/java/org/example/Administration.java b/src/main/java/org/example/Administration.java index f5940fa..d7cd3bf 100644 --- a/src/main/java/org/example/Administration.java +++ b/src/main/java/org/example/Administration.java @@ -1,2 +1,59 @@ -package org.example;public class Administration { +package org.example; + +import java.util.ArrayList; +import java.util.List; + +public class Administration { + private List professors; + private List admins; + + public Administration() + { + this.professors = new ArrayList<>(); + this.admins = new ArrayList<>(); + } + + + public boolean deleteProfessor(String professorID) + { + for(Professor professor : professors) + { + if(professor.getProfessorID().equals(professorID)){ + professors.remove(professor); + return true; //Course found and removed + } + } + + return false; + } + public void addProfessor(Professor professor) + { + professors.add(professor); + } + + public boolean deleteAdmin(String AdminID) + { + for(Admin admin : admins ) + { + if(admin.getId().equals(AdminID)){ + admins.remove(admin); + return true; //Course found and removed + } + } + + return false; + } + + public void addAdmin(Admin admin) + { + admins.add(admin); + } + + + + + + } + +