From d369184d49814f8e65b9f8f26d4ded84d77367ad Mon Sep 17 00:00:00 2001 From: Tobias Herbert Date: Tue, 6 Feb 2024 20:23:13 +0100 Subject: [PATCH] Documentation: Administration Class --- src/main/java/org/example/Administration.java | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/example/Administration.java b/src/main/java/org/example/Administration.java index ba383cb..706fc3e 100644 --- a/src/main/java/org/example/Administration.java +++ b/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 professors; private List 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);