From 679616e2b5f07ec4b30e407cf519d77d0fb9e5b2 Mon Sep 17 00:00:00 2001 From: Tobias Herbert Date: Tue, 6 Feb 2024 20:04:39 +0100 Subject: [PATCH] Added addAdmin Method to Administration Class --- src/main/java/org/example/Administration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/example/Administration.java b/src/main/java/org/example/Administration.java index 36c81c2..d7cd3bf 100644 --- a/src/main/java/org/example/Administration.java +++ b/src/main/java/org/example/Administration.java @@ -36,7 +36,7 @@ public class Administration { for(Admin admin : admins ) { if(admin.getId().equals(AdminID)){ - professors.remove(admin); + admins.remove(admin); return true; //Course found and removed } } @@ -44,6 +44,10 @@ public class Administration { return false; } + public void addAdmin(Admin admin) + { + admins.add(admin); + }