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 {
 14     // Import the Room namespace
 15     using namespace MRoom;
 16
 17
 18     // Data structure representing a cash office unit
 19     struct TCashOffice
 20     {
 21         TRoom Room;
 22         Ordinal NumberOfCounter;
 23     };
 24
 25
 26     // Initializes the TCashOffice structure
 27     void Init(TCashOffice &cof, Ordinal nor, Ordinal ar, Ordinal noc);
 28
 29     // Compares two exemplars
 30     // returns "true" if attributes of both are equal; "false" otherwise
 31     Boolean EqualValue(TCashOffice cof1, TCashOffice cof2);
 32
 33     // Copies the attributes of roo2
 34     // returns "true" if successful, "false" if no memory allocated
 35     Boolean Copy(TCashOffice* cof1, TCashOffice cof2);
 36
 37     // Returns the NumberOfRooms attribute
 38     Ordinal GetNumberOfRooms(TCashOffice cof);
 39
 40     // Sets the NumberOfRooms attribute
 41     void SetNumberOfRooms(TCashOffice &cof, Ordinal nor);
 42
 43     // Returns the Area attribute
 44     Ordinal GetArea(TCashOffice cof);
 45
 46     // Returns the NumberOfCounter attribute
 47     Ordinal GetNumberOfCounter(TCashOffice cof);
 48
 49     // Sets the NumberOfCounter attribute
 50     void SetNumberOfCounter(TCashOffice &cof, Ordinal nor);
 51
 52     // Displays the attributes
 53     void Show(TCashOffice cof);
 54
 55     // end of namespace CashOffice
 56 }
 57