diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-12-07 20:31:03 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-12-07 20:32:38 +0100 |
| commit | 7c7e45d69a93b8cddf703ad6df7b51a80dc83f88 (patch) | |
| tree | 867657652df61f259d6f94fec1cfaff90e689252 /src/de/fhswf/in/inf/se/projektthemenvergabe/Projekt.java | |
| download | Projektthemenvergabe-7c7e45d69a93b8cddf703ad6df7b51a80dc83f88.tar.gz Projektthemenvergabe-7c7e45d69a93b8cddf703ad6df7b51a80dc83f88.zip | |
Initial commit for Projektthemenvergabe
Diffstat (limited to 'src/de/fhswf/in/inf/se/projektthemenvergabe/Projekt.java')
| -rw-r--r-- | src/de/fhswf/in/inf/se/projektthemenvergabe/Projekt.java | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/src/de/fhswf/in/inf/se/projektthemenvergabe/Projekt.java b/src/de/fhswf/in/inf/se/projektthemenvergabe/Projekt.java new file mode 100644 index 0000000..4c689f7 --- /dev/null +++ b/src/de/fhswf/in/inf/se/projektthemenvergabe/Projekt.java @@ -0,0 +1,135 @@ +package de.fhswf.in.inf.se.projektthemenvergabe; + +import java.util.ArrayList; +import java.util.Date; + +public class Projekt +{ + private String projektthema; + + private String skizze; + + private String projektbeschreibung; + + private String projekteinhalte; + + private Date präsentationstermin; + + private Dozent dozent; + + private ArrayList<Student> student = new ArrayList<Student>(); + + private Ansprechpartner ansprechpartner; + + public String getProjektthema() + { + return this.projektthema; + } + + public void setProjektthema(String projektthema) + { + this.projektthema = projektthema; + } + + public String getSkizze() + { + return this.skizze; + } + + public void setSkizze(String skizze) + { + this.skizze = skizze; + } + + public String getProjektbeschreibung() + { + return this.projektbeschreibung; + } + + public void setProjektbeschreibung(String projektbeschreibung) + { + this.projektbeschreibung = projektbeschreibung; + } + + public String getProjekteinhalte() + { + return this.projekteinhalte; + } + + public void setProjekteinhalte(String projekteinhalte) + { + this.projekteinhalte = projekteinhalte; + } + + public Date getPräsentationstermin() + { + return this.präsentationstermin; + } + + public void setPräsentationstermin(Date präsentationstermin) + { + this.präsentationstermin = präsentationstermin; + } + + public Projekt(Student student1, Student student2, Student student3, + Ansprechpartner ansprechpartner, Dozent dozent) + { + if (student1 == null && student2 == null && student3 == null) + { + throw new IllegalArgumentException( + "Zumindest ein Student sollte das Projekt bearbeiten."); + } + + if (ansprechpartner == null) + { + throw new IllegalArgumentException( + "Das Projekt sollte irgendwo gemacht werden."); + } + + if (dozent == null) + { + throw new IllegalArgumentException( + "Das Projekt sollte für einen Dozenten gemacht werden."); + } + + if (student1 != null) + { + student.add(student1); + student1.setProjekt(this); + } + + if (student2 != null) + { + student.add(student2); + student2.setProjekt(this); + } + + if (student3 != null) + { + student.add(student3); + student3.setProjekt(this); + } + + this.dozent = dozent; + this.dozent.addProjekt(this); + this.ansprechpartner = ansprechpartner; + this.ansprechpartner.addProjekt(this); + } + + public Dozent getDozent() + { + return this.dozent; + } + + public Student[] toStudentArray() + { + Student[] lStudent_Temp = new Student[this.student.size()]; + this.student.toArray(lStudent_Temp); + return lStudent_Temp; + } + + public Ansprechpartner getAnsprechpartner() + { + return this.ansprechpartner; + } +}
\ No newline at end of file |
