Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c + + , need help with compile files Instructions Design the class doctorType, inherited from the class personType, defined in Chapter 1 0

In c++, need help with compile files
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 have a problem regarding my billType and my patientType, it says it had a runtime error and couldn't compile files. here they are below, I can't put the .h files or the main.cpp because they are too long, but as long as it includes them it is ok.
billtypeimp.cpp
#include "billType.h"
billType::billType(int ID, double Med, double pDrF, double room_Charge)
{
PtID = ID;
MedChg = Med;
DrF = pDrF;
RmChg = room_Charge;
}
void billType::setMedChg(double Med)
{
MedChg = Med;
}
double billType::getMedChg() const
{
return MedChg;
}
void billType::setDrF(double pDrF)
{
DrF = pDrF;
}
double billType::getDrF() const
{
return DrF;
}
void billType::setRmChg(double pRmChg)
{
RmChg = pRmChg;
}
double billType::getRmChg() const
{
return RmChg;
}
patientypeimp.cpp
#include
#include "patientType.h"
patientType::patientType(string First, string Last, int ID, int PtAge, dateType DoB, dateType pAdmtDt, dateType pDcDt, doctorType pDr)
{
setName(First,Last);
PtID = ID;
Age = PtAge;
dtBth = DoB;
admtDt = pAdmtDt;
DcDt = pDcDt;
Dr = pDr;
}
void patientType::setPtID(int ID)
{
PtID = ID;
}
void patientType::setAge(int pAge)
{
Age = pAge;
}
void patientType::setDoB(dateType DoB)
{
dtBth = DoB;
}
void patientType::setAdmtDt(dateType pAdmtDt)
{
admtDt = pAdmtDt;
}
void patientType::setDcDt(dateType pDcDt)
{
DcDt = pDcDt;
}
void patientType::setPcNm(doctorType pDr)
{
Dr = pDr;
}
int patientType::getPtID()
{
return PtID;
}
int patientType::getAge()
{
return Age;
}
dateType patientType::getDoB()
{
return dtBth;
}
dateType patientType::getAdmtDt()
{
return admtDt;
}
dateType patientType::getDcDt()
{
return DcDt;
}
string patientType::getPcNm()
{
return Dr.getfName().append(""+ Dr.getlName());
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

Students also viewed these Databases questions

Question

List and define three types of data transmission controls.

Answered: 1 week ago

Question

8-6 Who poses the biggest security threat: insiders or outsiders?

Answered: 1 week ago