Create a class patient that stores the patient name a


Question: Create a class Patient that stores the patient name (a string) and the disease (a string) of thepatient. From this class derive two classes : In_patient which has a data member roomrent(type float) and Out_patient which has a data member OPD_charges (float). Each of thesethree classes should have a nondefault constructor and a putdata() function to display itsdata. Write a main() program to test In_ patient and Out_patient classes by creatinginstances of them and then displaying the data with putdata().

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a class patient that stores the patient name a
Reference No:- TGS02263301

Expected delivery within 24 Hours