1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente II, Aufgabe C1.1
3 //
4 // author: Stephan Brumme
5 // last changes: July 3, 2001
6
7 #if !defined(AFX_CASHOFFICE_H__26E07000_EA3B_11D4_9BB7_AFEE07846A21__INCLUDED_)
8 #define AFX_CASHOFFICE_H__26E07000_EA3B_11D4_9BB7_AFEE07846A21__INCLUDED_
9
10 #if _MSC_VER > 1000
11 #pragma once
12 #endif // _MSC_VER > 1000
13
14
15 // we derive from CRoom
16 #include "Room.h"
17
18
19 // derive publicly
20 class CCashOffice : public CRoom
21 {
22 public:
23 // constructors
24 CCashOffice();
25 CCashOffice(const CCashOffice& cashOffice);
26 CCashOffice(int nNumberOfRoom, int nArea, int nNumberOfCounter);
27
28 // return class name
29 virtual string ClassnameOf() const { return "CCashOffice"; }
30
31 // display the attributes
32 virtual string Show() const;
33 // only for internal purposes !
34 virtual string ShowDebug() const;
35
36 // validate a cashoffice
37 virtual bool ClassInvariant() const;
38
39 // copy one cashoffice to another one
40 virtual CCashOffice& operator=(const CCashOffice& cashOffice);
41 virtual bool Copy(const CBasicClass* pClass);
42
43 // compare two cashoffices
44 virtual bool operator==(const CCashOffice& cashOffice) const;
45 virtual bool EqualValue(const CBasicClass* pClass) const;
46 // needed to use in a STL set
47 bool operator < (const CCashOffice &cashOffice) const;
48
49 // access m_nNumberOfCounter
50 int GetNumberOfCounter() const;
51 void SetNumberOfCounter(const int nNumberOfCounter);
52
53 // access m_nNumberOfRoom of CRoom
54 int GetNumberOfCashOffice() const;
55 void SetNumberOfCashOffice(const int nNumberOfCashOffice);
56
57 // deliver m_nArea of CRoom
58 int GetAreaOfCashOffice() const;
59
60 enum { MAXCOUNTER = 100 };
61 private:
62 int m_nNumberOfCounter;
63 };
64
65 #endif // !defined(AFX_CASHOFFICE_H__26E07000_EA3B_11D4_9BB7_AFEE07846A21__INCLUDED_)
66
67