From 11b63c519afed1128a65afd7e69b7e0095d7c275 Mon Sep 17 00:00:00 2001 From: fdai7887 Date: Thu, 8 Feb 2024 16:29:09 +0100 Subject: [PATCH] Added getter for coursesTaught --- src/main/java/org/example/Professor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/example/Professor.java b/src/main/java/org/example/Professor.java index 464757e..ec3271f 100644 --- a/src/main/java/org/example/Professor.java +++ b/src/main/java/org/example/Professor.java @@ -29,6 +29,7 @@ public class Professor { public Professor() { } + /** * Constructs a new Professor with the specified ID, name, and role. * @@ -44,11 +45,15 @@ public class Professor { } + + public List getCoursesTaught() {return coursesTaught;} + /** * Retrieves the professor's ID. * * @return the unique identifier for the professor */ + public String getProfessorID() { return professorID; }