-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPatient.cpp
54 lines (46 loc) · 1.03 KB
/
Patient.cpp
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
#include <iostream>
#include <ostream>
#include <string>
using namespace std;
#include "Patient.h"
Patient::Patient ( const string &in_first_name,
const string &in_last_name,
const string &in_age,
const string &in_ailment )
{
first_name = in_first_name;
last_name = in_last_name;
age = in_age;
ailment = in_ailment;
}
Patient::Patient ( const Patient &in_patient )
{
first_name = in_patient.first_name;
last_name = in_patient.last_name;
age = in_patient.age;
ailment = in_patient.ailment;
}
string Patient::get_first_name ()
{
return first_name;
}
string Patient::get_last_name ()
{
return last_name;
}
/* overloaded << to print out all patient information
*/
std::ostream& operator<<( std::ostream &os, Patient &in_patient )
{
os << "" << in_patient.first_name
<< " " << in_patient.last_name
<< ", " << in_patient.age
<< " -- " << in_patient.ailment
<< endl;
os << endl;
return os;
}
void Patient::print_patient ( std::ostream &os )
{
os << this << endl;
}