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 appo
p 9:10 * stc ksa liı. pdf.ol Ļol 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
Step by step
Solved in 4 steps with 1 images