/////////////////////////////////////////////////////////// // Softwarebauelemente I, Aufgabe M6.1 // // author: Stephan Brumme // last changes: November 23, 2000 // import cout to display some data #include #include "MRoom.h" namespace MCashOffice { // Import the Room namespace using namespace MRoom; // Data structure representing a cash office unit struct TCashOffice { TRoom Room; Ordinal NumberOfCounter; }; // Initializes the TCashOffice structure void Init(TCashOffice &cof, Ordinal nor, Ordinal ar, Ordinal noc); // Compares two exemplars // returns "true" if attributes of both are equal; "false" otherwise Boolean EqualValue(TCashOffice cof1, TCashOffice cof2); // Copies the attributes of roo2 // returns "true" if successful, "false" if no memory allocated Boolean Copy(TCashOffice* cof1, TCashOffice cof2); // Returns the NumberOfRooms attribute Ordinal GetNumberOfRooms(TCashOffice cof); // Sets the NumberOfRooms attribute void SetNumberOfRooms(TCashOffice &cof, Ordinal nor); // Returns the Area attribute Ordinal GetArea(TCashOffice cof); // Returns the NumberOfCounter attribute Ordinal GetNumberOfCounter(TCashOffice cof); // Sets the NumberOfCounter attribute void SetNumberOfCounter(TCashOffice &cof, Ordinal nor); // Displays the attributes void Show(TCashOffice cof); // end of namespace CashOffice }