sources:
M07_1.cpp (302 bytes)
MCashOffice.cpp (2.0k)
MCashOffice.h (1.4k)
MRoom.cpp (4.9k)
MRoom.h (1.1k)
PrimitiveTypes.h (421 bytes)


website:
more info here
studies/bauelemente/Softwarebauelemente-CodeM7-1/MRoom.h
download file

  1 ///////////////////////////////////////////////////////////
  2 // Softwarebauelemente I, Aufgabe M7.1
  3 //
  4 // author: Stephan Brumme
  5 // last changes: January 08, 2001
  6
  7 #ifndef __ROOM_H__
  8 #define __ROOM_H__
  9
 10
 11 #include "PrimitiveTypes.h"
 12
 13
 14 // define the namespace Room
 15 namespace MRoom {
 16     // Data structure representing a room unit
 17     typedef int TRoom;
 18
 19 // struct TRoom
 20 // {
 21 // Ordinal NumberOfRooms;
 22 // Ordinal Area;
 23 // };
 24
 25
 26     // Initializes the TRoom structure
 27     void Init(TRoom &roo, Ordinal nor, Ordinal ar);
 28
 29     // Compares two exemplars
 30     // returns "true" if attributes of both are equal; "false" otherwise
 31     Boolean EqualValue(TRoom roo1, TRoom roo2);
 32
 33     // Copies the attributes of roo2
 34     // returns "true" if successful, "false" if no memory allocated
 35     Boolean Copy(TRoom& roo1, TRoom roo2);
 36
 37     // Returns the NumberOfRooms attribute
 38     Ordinal GetNumberOfRooms(TRoom roo);
 39
 40     // Sets the NumberOfRooms attribute
 41     void SetNumberOfRooms(TRoom &roo, Ordinal nor);
 42
 43     // Returns the Area attribute
 44     Ordinal GetArea(TRoom roo);
 45
 46     // Displays the attributes
 47     void Show(TRoom roo);
 48 }
 49
 50 #endif
 51