Browse Source

Added toString() to print Professor Information

remotes/origin/fdai7780
fdai7600 11 months ago
parent
commit
0d366c9d7b
  1. 9
      src/main/java/org/example/Professor.java

9
src/main/java/org/example/Professor.java

@ -37,4 +37,13 @@ public class Professor {
public void setRole(String role) {
this.role = role;
}
@Override
public String toString() {
return "Professor{" +
"professorID='" + professorID + '\'' +
", Name='" + Name + '\'' +
", role='" + role + '\'' +
'}';
}
}
Loading…
Cancel
Save