Question: C + + help with main.cpp Instructions Design the class doctorType, inherited from the class personType, defined in Chapter 1 0 , with an additional

C++ help with main.cpp
Instructions
Design the class doctorType, inherited from the class personType, defined in Chapter 10, with an additional data member to store a doctors specialty. Add appropriate constructors and member functions to initialize, access, and manipulate the data members.
Design the class billType with data members to store a patients ID and a patients hospital charges, such as pharmacy charges for medicine, doctors fee, and room charges. Add appropriate constructors and member functions to initialize, access, and manipulate the data members. If no value is provided for a charge, it should default to 0.
Design the class patientType, inherited from the class personType, defined in Chapter 10, with additional data members to store a patients ID, age, date of birth, attending physicians 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 physicians name.) Add appropriate constructors and member functions to initialize, access, and manipulate the data members.
Be careful! The dateType object and the patientType object might accept different date formats.
Write a program to test your classes.
I am trying to write a main.cpp for this assignment but I keep getting into problems with it. I will put down below the four .h files for help, There might be empty spots on the #include though so if that happens I will try to resend the question if it is an issue. Make sure yours is runnable.
billType.h
#ifndef H_billType
#define H_billType
#include "doctorType.h"
#include "personType.h"
#include "dateType.h"
#include
using namespace std;
class billType
{
public:
void printBill() const;
void setInfo(string id ="", double phCharges =0, double rRent =0, double docFee =0);
void setID(string id);
string getID() const;
void setPharmacyCharges(double charges =0);
double getPharmacyCharges() const;
void updatePharmacyCharges(double charges =0);
void setRoomRent(double charges =0);
double getRoomRent() const;
void updateRoomRent(double charges =0);
void setDoctorFee(double charges =0);
double getDoctorFee() const;
void updateDoctorFee(double charges =0);
double billingAmount() const;
billType(string id ="", double phCharges =0, double rRent =0, double docFee =0);
private:
string ID;
double pharmacyCharges;
double roomRent;
double doctorFee;
};
#endif
dateType.h
#ifndef H_dateType
#define H_dateType
#include
using namespace std;
class dateType
{
public:
void setDate(int month, int day, int year);
int getMonth() const;
int getDay() const;
int getYear() const;
void printDate() const;
dateType(int month =1, int day =1, int year =1900);
private:
int dMonth;
int dDay;
int dYear;
};
#endif
doctorType.h
#ifndef H_doctorType
#define H_doctorType
#include "personType.h"
#include
using namespace std;
class doctorType : public personType
{
public:
void setSpecialty(string specialty);
string getSpecialty() const;
doctorType(string first ="", string last ="", string specialty ="");
private:
string specialty;
};
#endif
patientType.h
#ifndef H_patientType
#define H_patientType
#include "personType.h"
#include "dateType.h"
#include "billType.h"
#include "doctorType.h"
#include
using namespace std;
class patientType : public personType
{
public:
void setPatientInfo(string id ="", int age =0, dateType dob = dateType(),
string physician ="", dateType admitDate = dateType(), dateType dischargeDate = dateType(),
double phCharges =0, double rRent =0, double docFee =0);
void setID(string id);
string getID() const;
void setAge(int age);
int getAge() const;
void setDateOfBirth(int month, int day, int year);
dateType getDateOfBirth() const;
void setAttendingPhysician(string physician);
string getAttendingPhysician() const;
void setAdmitDate(int month, int day, int year);
dateType getAdmitDate() const;
void setDischargeDate(int month, int day, int year);
dateType getDischargeDate() const;
void setBillInfo(double phCharges =0, double rRent =0, double docFee =0);
void printPatientInfo() const;
double billingAmount() const;
patientType(string id ="", int age =0, dateType dob = dateType(),
string physician ="", dateType admitDate = dateType(), dateType dischargeDate = dateType(),
double phCharges =0, double rRent =0, double docFee =0);
private:
string patientID;
int patientAge;
dateType dateOfBirth;
string attendingPhysician;
dateType admissionDate;
dateType dischargeDate;
billType patientBill;
};
#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!