|
|
@ -20,7 +20,7 @@ public class Administration { |
|
|
|
{ |
|
|
|
if(professor.getProfessorID().equals(professorID)){ |
|
|
|
professors.remove(professor); |
|
|
|
return true; //Course found and removed |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -30,12 +30,23 @@ public class Administration { |
|
|
|
{ |
|
|
|
professors.add(professor); |
|
|
|
} |
|
|
|
public Professor findProfessorById(String professorId) |
|
|
|
{ |
|
|
|
for(Professor professor :professors) |
|
|
|
{ |
|
|
|
if(professor.getProfessorID().equals(professorId)) |
|
|
|
{ |
|
|
|
return professor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public boolean deleteAdmin(String AdminID) |
|
|
|
return null; |
|
|
|
} |
|
|
|
public boolean deleteAdmin(String adminID) |
|
|
|
{ |
|
|
|
for(Admin admin : admins ) |
|
|
|
{ |
|
|
|
if(admin.getId().equals(AdminID)){ |
|
|
|
if(admin.getId().equals(adminID)){ |
|
|
|
admins.remove(admin); |
|
|
|
return true; //Course found and removed |
|
|
|
} |
|
|
@ -43,24 +54,12 @@ public class Administration { |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
public void addAdmin(Admin admin) |
|
|
|
{ |
|
|
|
admins.add(admin); |
|
|
|
} |
|
|
|
|
|
|
|
public Professor findProfessorById(String professorId) |
|
|
|
{ |
|
|
|
for(Professor professor :professors) |
|
|
|
{ |
|
|
|
if(professor.getProfessorID().equals(professorId)) |
|
|
|
{ |
|
|
|
return professor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|