sources:
M06_1.cpp (390 bytes)
MCashOffice.cpp (2.0k)
MCashOffice.h (1.4k)
MRoom.cpp (1.5k)
MRoom.h (1.1k)
PrimitiveTypes.h (421 bytes)


website:
more info here
studies/bauelemente/Softwarebauelemente-CodeM6-1/MCashOffice.h
download file

  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