hospital billing system

In this exercise, you will design various classes and write a program to computerize the billing system of a hospital.
1. Design the class doctorType, inherited from the class personType,with an additional data member to store a doctor’s specialty. Add
appropriate constructors and member functions to initialize, access, and manipulate the data members.
2. Design the class billType with data members to store a patient’s ID and a patient’s hospital
charges, such as pharmacy charges for medicine, doctor’s fee, and room charges. Add appropriate constructors and member functions to initialize and access and manipulate the data members.
3. Design the class patientType, inherited from the class personType with additional data members to store a patient’s ID, age, date of birth,
attending physician’s name, the date when the patient was admitted in the hospital, and the date when the patient was discharged from the hospital. (Use the class dateType to store
the date of birth, admit date, discharge date, and the class doctorType to store the attending physician’s name.) Add appropriate constructors and member functions to initialize, access, and manipulate the data members. Write a program to test your classes.

_____________________________________________________________________________

this is the testDriver(main)

Template
 All required files (header files as well as cpp files) are shown above.
 Use the following test driver.
#include <iostream>
#include <string>
#include "patientType.h"
#include "billType.h"
using namespace std;
int main()
{
patientType newPatient;
billType bill;
string str1, str2, str3;
cout << "Enter patient's ID: "; cin >> str1;
newPatient.setID(str1);
bill.setID(str1);
cout <<"Enter patient's first name: "; cin >> str1;
cout << "Enter patient's last name: "; cin >> str2;
newPatient.setName(str1, str2);
cout <<"Enter doctor's first name: "; cin >> str1;
cout << "Enter doctor's last name: "; cin >> str2;
newPatient.setDoctorName(str1, str2);
cout << "Enter doctor's speciality: "; cin >> str1;
cout<<"----------------------------------------------------------------------------\n";
newPatient.setDoctorSpl(str1);
newPatient.setAdmDate(11, 15, 2014);
newPatient.setDisDate(11, 21, 2014);
bill.setPharmacyCharges(245.50);
bill.setRoomRent(2500);
bill.setDoctorFee(3500.38);
newPatient.print();
bill.printBill();

return 0;
}


this is the output
http://store1.up-00.com/2015-10/1446212504881.png
Topic archived. No new replies allowed.