Create an inheritance hierarchy containing super class Patient and two sub classes Outpatient and Inpatient. Super class Patient contains: • Three data members pName, FileNo and pDiagnose. • No...


Create an inheritance hierarchy containing super class Patient<br>and two sub classes Outpatient and Inpatient.<br>Super class Patient contains:<br>• Three data members pName, FileNo and pDiagnose.<br>• No argument constructors and parametrized constructor.<br>• Method to display its data.<br>• Setters/ getters<br>- Class Outpatient which contains:<br>• Data members appointment_date, clinic_name, and<br>doctor_name<br>• No argument constructors and parametrized constructor.<br>• Method to display its data.<br>• Setters/ getters<br>Class Inpatient which contains:<br>• Data members admission_date, and number of estimated<br>stay days<br>• No argument constructors and parametrized constructor.<br>• Method to display its data.<br>• Setters/ getters<br>In all classes, there is calc_care_cost method that returns<br>the cost as follows:<br>i) Free for Patient<br>ii) 100 SR for each appointment for Outpatient<br>ii) 50 SR for each day for InPatient<br>

Extracted text: Create an inheritance hierarchy containing super class Patient and two sub classes Outpatient and Inpatient. Super class Patient contains: • Three data members pName, FileNo and pDiagnose. • No argument constructors and parametrized constructor. • Method to display its data. • Setters/ getters - Class Outpatient which contains: • Data members appointment_date, clinic_name, and doctor_name • No argument constructors and parametrized constructor. • Method to display its data. • Setters/ getters Class Inpatient which contains: • Data members admission_date, and number of estimated stay days • No argument constructors and parametrized constructor. • Method to display its data. • Setters/ getters In all classes, there is calc_care_cost method that returns the cost as follows: i) Free for Patient ii) 100 SR for each appointment for Outpatient ii) 50 SR for each day for InPatient

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here