-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
109 lines (96 loc) · 2.61 KB
/
Program.cs
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
using System;
namespace Schauspielhaus // nicht komplett, nicht funktionsfähig !!!
{
class Veranstaltungsplan
{
Saalplan[] Saalplaene;
public Saalplan getSaalplan()
{
return Saalplaene[0];
}
public void setSaalplan(Saalplan Saalplan)
{
}
}
class Saalplan
{
Veranstaltung Veranstaltung;
Spielstätte Spielstätte;
Platz[] AllePlaetze;
public bool istFrei(Platz Platz)
{
if (Platz.bestaetigt() != 0)
return false;
else
return true;
}
public void reservieren(Platz Platz)
{
}
public Spielstätte getSpielstaette()
{
return Spielstätte;
}
public void setSpielstaette(Spielstätte Spielstätte)
{
this.Spielstätte = Spielstätte;
}
public Veranstaltung getVeranstaltung()
{
return Veranstaltung;
}
public void setVeranstaltung(Veranstaltung Veranstaltung)
{
this.Veranstaltung = Veranstaltung;
}
public Platz[] getPlaetze()
{
return AllePlaetze;
}
public void setPlaetze(Platz EinPlaetz)
{
this.AllePlaetze[0] = EinPlaetz;
}
}
class Veranstaltung
{
string Name;
double Datum;
double Zeit;
}
class Spielstätte
{
string Name;
string Anschrift;
}
class Platz
{
int Nummer;
int Reihe;
public int bestaetigt()
{
return Nummer;
}
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello Veranstaltung!");
const int MaxPlaene = 100;
// array für alle Pläne
Veranstaltungsplan[] AlleVeranstaltungsplaene = new Veranstaltungsplan[MaxPlaene];
// neuen Plan an Index 0 erstellen
AlleVeranstaltungsplaene[0] = new Veranstaltungsplan();
// neuen Saalplan erstellen
Saalplan NeuerSaalplan = new Saalplan();
Veranstaltung NeueVeranstaltung = new Veranstaltung();
Spielstätte NeueSpielstaette = new Spielstätte();
Platz NeuerPlatz = new Platz();
NeuerSaalplan.setVeranstaltung(NeueVeranstaltung);
NeuerSaalplan.setSpielstaette(NeueSpielstaette);
NeuerSaalplan.setPlaetze(NeuerPlatz);
AlleVeranstaltungsplaene[0].setSaalplan(NeuerSaalplan);
}
}
}