/////////////////////////////////////////////////////////// // Softwarebauelemente I, Aufgabe M5.1 // // author: Stephan Brumme // last changes: November 20, 2000 // import cout to display some data #include // open std namespace using namespace std; // Data structure representing a room unit struct TRoom { int NumberOfRooms; int Area; }; // Initializes the TRoom structure void Init(TRoom &roo, int nor, int ar) { roo.NumberOfRooms = nor; roo.Area = ar; } // Compares two exemplars // returns "true" if attributes of both are equal; "false" otherwise bool EqualValue(TRoom roo1, TRoom roo2) { return ((roo1.Area == roo2.Area) && (roo1.NumberOfRooms = roo2.NumberOfRooms)); } // Copies the attributes of roo2 // returns "true" if successful, "false" if no memory allocated bool Copy(TRoom* roo1, TRoom roo2) { if (roo1 == NULL) return false; roo1->Area = roo2.Area; roo1->NumberOfRooms = roo2.NumberOfRooms; return true; } // Returns the NumberOfRooms attribute int GetNumberOfRooms(TRoom roo) { return roo.NumberOfRooms; } // Sets the NumberOfRooms attribute void SetNumberOfRooms(TRoom &roo, int nor) { roo.NumberOfRooms = nor; } // Returns the Area attribute int GetArea(TRoom roo) { return roo.Area; } // Displays the attributes void Show(TRoom roo) { cout<<"Es sind "<