-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPatient.h
More file actions
39 lines (33 loc) · 928 Bytes
/
Copy pathPatient.h
File metadata and controls
39 lines (33 loc) · 928 Bytes
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
// بسم الله الرحمن الرحيم
// "وَأَنْ لَيْسَ لِلْإِنسَانِ إِلَّا مَا سَعَىٰ"
// Free Palestine
#ifndef PATIENT_H
#define PATIENT_H
#include <bits/stdc++.h>
#include <iomanip>
#include "Person.h"
using namespace std;
#define nl '\n'
class Patient : public Person
{
public:
// Empty Constructor
Patient() : Person() {}
// Parameterized Constructor: Passes data up to the Person constructor
Patient(int id, string name, int age, CaseType caseType)
{
this->id = id;
this->name = name;
this->age = age;
this->caseType = caseType;
}
// Override Display
void display() const override
{
cout << "--- Patient Details ---" << nl;
// Call the base class display() to print common info (ID, Name, Age)
Person::display();
cout << "-----------------------" << nl;
}
};
#endif