From 52f8cd35167aa42f92c6cb656dd0212118c87540 Mon Sep 17 00:00:00 2001 From: fdai7887 Date: Tue, 6 Feb 2024 21:06:33 +0100 Subject: [PATCH] Added documentation to Administration class --- src/main/java/org/example/Administration.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/example/Administration.java b/src/main/java/org/example/Administration.java index 6acd8e1..2be870c 100644 --- a/src/main/java/org/example/Administration.java +++ b/src/main/java/org/example/Administration.java @@ -97,6 +97,12 @@ public class Administration { admins.add(admin); } + /** + * + * @param adminId the id of the admin you want to look for + * @return the value of the return statement expresses whether the admin has been found and if so returns this admin + */ + public Admin findAdminById(String adminId) { for(Admin admin :admins) @@ -109,7 +115,11 @@ public class Administration { return null; } - + /** + * + * @param studentID the id of the student you want to be deleted from the system + * @return the value of the return statement expresses whether the student has been deleted + */ public boolean deleteStudents(String studentID){ for(Student student : students){ if(student.getId().equals(studentID)){ @@ -120,11 +130,21 @@ public class Administration { return false; } + + /** + * + * @param student the professor you want to add to the system + */ public void addStudents(Student student){ students.add(student); } + /** + * + * @param studentId the id of the student you want to look for + * @return the value of the return statement expresses whether the student has been found and if so returns this student + */ public Student findStudentById(String studentId) { for(Student student :students)