-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPatient.h
executable file
·80 lines (62 loc) · 2.35 KB
/
Patient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* Patient.h
*
* Class Description: Models a walk-in clinic patient.
* Class Invariant: Each patient has a unique care card number.
* This care card number must have 10 digits.
* This care card number cannot be modified.
*
* Last modified on: May 2017
* Author: AL
*/
#pragma once
#include <string>
using namespace std;
class Patient {
private:
string name;
string address;
string phone;
string email;
string careCard;
public:
// Default Constructor
// Description: Create a patient with a care card number of "0000000000".
// Postcondition: All data members set to "To be entered",
// except the care card number which is set to "0000000000".
Patient();
// Parameterized Constructor
// Description: Create a patient with the given care card number.
// Postcondition: If aCareCard does not have 10 digits, then care card is set to "0000000000".
// All other data members set to "To be entered".
Patient(string aCareCard);
// Getters and setters
// Description: Returns patient's name.
string getName() const;
// Description: Returns patient's address.
string getAddress() const;
// Description: Returns patient's phone number.
string getPhone() const;
// Description: Returns patient's email.
string getEmail() const;
// Description: Returns patient's care card number.
string getCareCard() const;
// Description: Sets the patient's name.
void setName(const string aName);
// Description: Sets the patient's address.
void setAddress(const string anAddress);
// Description: Sets the patient's phone number.
void setPhone(const string aPhone);
// Description: Sets the patient's email.
void setEmail(const string anEmail);
// Overloaded Operators
// Description: Comparison operator. Compares "this" Patient object with "rhs" Patient object.
// Returns true if both Patient objects have the same care card number.
bool operator==(const Patient & rhs);
// Description: Greater than operator. Compares "this" Patient object with "rhs" Patient object.
// Returns true if the care card number of "this" Patient object is > the care card number of "rhs" Patient object.
bool operator>(const Patient & rhs);
// Description: Prints the content of "this" patient.
void printPatient( );
};
// end of Patient.h