Browse Source

Documentation: Administration Class

remotes/origin/fdai7780
Tobias Herbert 11 months ago
parent
commit
d369184d49
  1. 34
      src/main/java/org/example/Administration.java

34
src/main/java/org/example/Administration.java

@ -4,16 +4,26 @@ import java.util.ArrayList;
import java.util.List;
public class Administration {
/**
* Instance Variables
*/
private List<Professor> professors;
private List<Admin> admins;
/**
* Constructor
*/
public Administration()
{
this.professors = new ArrayList<>();
this.admins = new ArrayList<>();
}
/**
*
* @param professorID the id of the professor you want to be deleted from the system
* @return the value of the return statement expresses whether the professor has been deleted
*/
public boolean deleteProfessor(String professorID)
{
for(Professor professor : professors)
@ -26,10 +36,21 @@ public class Administration {
return false;
}
/**
*
* @param professor the professor you want to add to the system
*/
public void addProfessor(Professor professor)
{
professors.add(professor);
}
/**
*
* @param professorId the id of the professor you want to look for
* @return the value of the return statement expresses whether the professor has been found and if so returns this professor
*/
public Professor findProfessorById(String professorId)
{
for(Professor professor :professors)
@ -42,6 +63,12 @@ public class Administration {
return null;
}
/**
*
* @param adminID the id of the admin you want to be deleted from the system
* @return the value of the return statement expresses whether the admin has been deleted
*/
public boolean deleteAdmin(String adminID)
{
for(Admin admin : admins )
@ -54,6 +81,11 @@ public class Administration {
return false;
}
/**
*
* @param admin the admin you want to add to the system
*/
public void addAdmin(Admin admin)
{
admins.add(admin);

Loading…
Cancel
Save