Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lecture {
- private String titel;
- private int maxTeilnehmer;
- private Lecturer dozent;
- private LectureRoom hoersaal;
- public Lecture(String titel, int maxTeilnehmer) {
- this.titel = titel;
- this.maxTeilnehmer = maxTeilnehmer;
- }
- public void setDozent(Lecturer dozent) {
- if (this.titel == dozent.getFachgebiet()) {
- this.dozent = dozent;
- } else {
- System.out.println("Dozent ist ein noob in diesem Gebiet");
- }
- }
- public void setHoersaal(LectureRoom hoersaal) {
- if (this.maxTeilnehmer >= hoersaal.getAnzPlaetze()) {
- this.hoersaal = hoersaal;
- } else {
- System.out.println("Raum zu klein");
- }
- }
- public String getTitel() {
- return this.titel;
- }
- public int getMaxTeilnehmer() {
- return this.maxTeilnehmer;
- }
- public Lecturer getDozent() {
- return this.dozent;
- }
- public LectureRoom getHoersaal() {
- return this.hoersaal;
- }
- }
Add Comment
Please, Sign In to add comment