1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente I, Aufgabe M6.1
3 //
4 // author: Stephan Brumme
5 // last changes: November 23, 2000
6
7
8 // import cout to display some data
9 #include <iostream>
10 #include "MRoom.h"
11
12 namespace MCashOffice
{
13 // Import the Room namespace
14 using namespace MRoom;
15
16
17 // Data structure representing a cash office unit
18 struct TCashOffice
{
19 TRoom Room;
20 Ordinal NumberOfCounter;
21 };
22
23
24 // Initializes the TCashOffice structure
25 void Init(TCashOffice &cof, Ordinal nor, Ordinal ar, Ordinal noc);
26
27 // Compares two exemplars
28 // returns "true" if attributes of both are equal; "false" otherwise
29 Boolean EqualValue(TCashOffice cof1, TCashOffice cof2);
30
31 // Copies the attributes of roo2
32 // returns "true" if successful, "false" if no memory allocated
33 Boolean Copy(TCashOffice* cof1, TCashOffice cof2);
34
35 // Returns the NumberOfRooms attribute
36 Ordinal GetNumberOfRooms(TCashOffice cof);
37
38 // Sets the NumberOfRooms attribute
39 void SetNumberOfRooms(TCashOffice &cof, Ordinal nor);
40
41 // Returns the Area attribute
42 Ordinal GetArea(TCashOffice cof);
43
44 // Returns the NumberOfCounter attribute
45 Ordinal GetNumberOfCounter(TCashOffice cof);
46
47 // Sets the NumberOfCounter attribute
48 void SetNumberOfCounter(TCashOffice &cof, Ordinal nor);
49
50 // Displays the attributes
51 void Show(TCashOffice cof);
52
53 // end of namespace CashOffice
54 }
55
56