blob: 4c689f76c3fd97782d79dcac14f2e8363e28a46a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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;
}
}
|