1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente I, Aufgabe M6.5.
3 //
4 // author: Stephan Brumme
5 // last changes: January 07, 2001
6
7
8 // import cout to display some data
9 #include <iostream>
10 #include "MDate.h"
11 #include "MRoom.h"
12 #include "MHouseADT.h"
13
14 // open some namespaces
15 using namespace std;
16 using namespace MHouseADT;
17
18 void main()
19 {
20 MDate::TDate MyDate;
21 MDate::Today(MyDate);
22 MDate::Show(MyDate);
23
24
25 UHouseADT MyHouse, MyHouse2;
26 MRoom::TRoom MyRoom;
27
28 NewHouseADT(&MyHouse);
29 NewHouseADT(&MyHouse2);
30
31 Show(MyHouse);
32
33 MRoom::Init(MyRoom, 2, 30);
34
35 Insert(MyHouse, MyRoom);
36 Insert(MyHouse, MyRoom);
37
38 Show(MyHouse);
39
40 Copy(MyHouse2, MyHouse);
41
42 Show(MyHouse2);
43
44 DeleteHouseADT(&MyHouse);
45 DeleteHouseADT(&MyHouse2);
46 }
47