1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente I, Aufgabe O1.1
3 //
4 // author: Stephan Brumme
5 // last changes: January 13, 2001
6
7
8 #include "Room.h"
9 #include <iostream>
10
11
12 using namespace std;
13
14
15 void main()
16 {
17 CRoom myRoom(2,3);
18 CRoom myRoom2(4,5);
19
20 myRoom.Show();
21 myRoom2.Show();
22
23 // I wrote some lines twice to verify the overloaded operators
24
25 cout<<"Compare rooms ... "<<(myRoom==myRoom2)<<endl;
26 // cout<<"Compare rooms ... "<<myRoom.EqualValue(myRoom2)<<endl;
27
28 cout<<"Now copy myRoom to myRoom2 ..."<<endl;
29 myRoom2 = myRoom;
30 // myRoom2.Copy(myRoom);
31
32 cout<<"Compare again ... "<<(myRoom==myRoom2)<<endl;
33 // cout<<"Compare again ... "<<myRoom.EqualValue(myRoom2)<<endl;
34
35 cout<<"Verify the Copy-To-Itself protection ..."<<myRoom.Copy(myRoom)<<endl;
36 }
37