SlideShare a Scribd company logo
1 of 11
Download to read offline
Design various classes and write a program to computerize the billing system of a hospital.
Design the class doctor Type, inherited from the class personType, defined in Chapter 10, 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. Design the class bill
Type 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, access, and manipulate the data members. Design the class
patientType, inherited from the class personType, defined in Chapter 10, 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.
Solution
Please find the code for the given problem with required classes
//billType.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;
}
//billType.h
#ifndef billType_H
#define billType_H
#include
#include
using namespace std;
class billType
{
private :
int PtID;
double MedChg;
double DrF;
double RmChg;
public:
billType(int PtID = 0, double MedChg = 0, double DrF = 0, double RmChg = 0);
void setMedChg(double MedChg);
double getMedChg() const;
void setDrF(double DrF);
double getDrF() const;
void setRmChg(double RmChg);
double getRmChg() const;
};
#endif billType_H
//dateType.cpp
#include
#include "dateType.h"
using namespace std;
void dateType::setDate(int Month, int Day, int Year)
{
nMnth = Month;
nDay = Day;
nYr = Year;
}
int dateType::getDay() const
{
return nDay;
}
int dateType::getMonth() const
{
return nMnth;
}
int dateType::getYear() const
{
return nYr;
}
void dateType::printDate() const
{
cout << nMnth << "-" << nDay << "-" << nYr;
}
//Constructor with parameters
dateType::dateType(int Month, int Day, int Year)
{
nMnth = Month;
nDay = Day;
nYr = Year;
}
//dateType.h
#ifndef dateType_H
#define dateType_H
class dateType
{
public:
void setDate(int Month, int Day, int Year);
int getDay() const;
int getMonth() const;
int getYear() const;
void printDate() const;
dateType(int Month = 1, int Day = 1, int Year = 1900);
private:
int nMnth;
int nDay;
int nYr;
};
#endif
//doctorType.cpp
#include "doctorType.h"
doctorType::doctorType(string First, string Last ,string pDrSpec)
{
setName(First,Last);
Spec = pDrSpec;
}
void doctorType::setSpec(string pDrSpec)
{
Spec = pDrSpec;
}
string doctorType::getSpec()
{
return Spec;
}
//doctorType.h
#ifndef doctorType_H
#define doctorType_H
#include
#include
#include "personType.h"
using namespace std;
//inherits from personType class
class doctorType : public personType
{
private :
string Spec;
public:
//public member function of doctor class
doctorType(string First = "", string Last = "", string Spec = "");
void setSpec(string Spec) ;
string getSpec() ;
};
#endif doctorType_H
//main.cpp
#include
//Include header files
#include "doctorType.h"
#include "patientType.h"
#include "dateType.h"
#include "billType.h"
using namespace std;
int main()
{
//create an object of class
doctorType doctor("Bob", "Evans", "Endocrinologist");
cout << "**********************************" << endl;
cout << "** Doctor Details **" << endl;
cout << "**********************************" << endl;
cout << "** Dr. Name: " << doctor.getfName() << " " << doctor.getlName() << endl;
cout << "** Specialty: " << doctor.getSpec() << endl;
cout << "**********************************" << endl;
cout << endl;
//Create three dateType objects for date of birth,
//admit date and dicahrage date
dateType dtBth(10,12,1954);
dateType admtDt(6,25,2015);
dateType DcDt(7,1,2015);
patientType patient("Don","Johnson", 12345, 60, dtBth, admtDt, DcDt, doctor);
cout << "**********************************" << endl;
cout << "** Patient Details **" << endl;
cout << "**********************************" << endl;
cout << "** Patient Name: " << patient.getfName() << " " << patient.getlName() << endl;
cout << "** Patient ID: " << patient.getPtID() << endl;
cout << "** Age: " << patient.getAge() << endl;
cout << "** Date Of Birth: ";
patient.getDoB().printDate();
cout << endl;
cout << "**********************************" << endl;
cout << endl;
cout << "**********************************" << endl;
cout << "** Visit Details **" << endl;
cout << "**********************************" << endl;
cout << "** Date of Admission: ";
patient.getAdmtDt().printDate();
cout << " ** Date of Discharge: ";
patient.getDcDt().printDate();
cout << " ** Doctor Name: "<< patient.getPcNm() << endl;
cout << "**********************************" << endl;
cout << endl;
//create an instance of billType
billType patientBill(10345,14900,1400,400);
cout << "**********************************" << endl;
cout << "** Billing Details **" << endl;
cout << "**********************************" << endl;
cout << "** Medicine Cost: " << patientBill.getMedChg() << endl;
cout << "** Doctor Fee: " << patientBill.getDrF() << endl;
cout << "** Room Charges: " << patientBill.getRmChg() << endl;
cout << "** Total pay: " << patientBill.getMedChg() + patientBill.getDrF() +
patientBill.getRmChg() << endl;
cout << "**********************************" << endl;
system("pause");
return 0;
}
//patientType.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());
}
//patientType.h
#ifndef patientType_H
#define patientType_H
#include
#include
#include "personType.h"
#include "dateType.h"
#include "doctorType.h"
using namespace std;
class patientType :public personType
{
private:
int PtID;
int Age;
dateType dtBth;
dateType admtDt;
dateType DcDt;
doctorType Dr;
public:
patientType(string First, string Last, int PtID, int Age, dateType dtBth, dateType admtDt,
dateType DcDt, doctorType Dr);
void setPtID(int ID);
int getPtID();
void setAge(int Age);
int getAge();
void setDoB(dateType DoB);
dateType getDoB();
void setAdmtDt(dateType AdmtDt);
dateType getAdmtDt();
void setDcDt(dateType DcDt);
dateType getDcDt();
void setPcNm(doctorType Dr);
string getPcNm();
};
#endif patientType_H
//personType.cpp
#include
#include
#include "personType.h"
using namespace std;
void personType::print() const
{
cout << fName << " " << lName;
}
void personType::setName(string First, string Last)
{
fName = First;
lName = Last;
}
string personType::getfName() const
{
return fName;
}
string personType::getlName() const
{
return lName;
}
personType::personType(string First, string Last)
{
fName = First;
lName = Last;
}
//personType.h
#ifndef personType_H
#define personType_H
#include
using namespace std;
class personType
{
public:
void print() const;
void setName(string First, string Last);
string getfName() const;
string getlName() const;
personType(string First = "", string Last = "");
protected:
string fName;
string lName;
};
#endif personType_H

More Related Content

Similar to Design various classes and write a program to computerize the billing.pdf

Question I need help with c++ Simple Classes Assigment. i get this .pdf
Question I need help with c++ Simple Classes Assigment. i get this .pdfQuestion I need help with c++ Simple Classes Assigment. i get this .pdf
Question I need help with c++ Simple Classes Assigment. i get this .pdfexxonzone
 
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docxINTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docxnormanibarber20063
 
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfg++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfarakalamkah11
 
Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.Ritika sahu
 
TypeScriptで書くAngularJS @ GDG神戸2014.8.23
TypeScriptで書くAngularJS @ GDG神戸2014.8.23TypeScriptで書くAngularJS @ GDG神戸2014.8.23
TypeScriptで書くAngularJS @ GDG神戸2014.8.23Okuno Kentaro
 
I keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfI keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfherminaherman
 
KingsleyUsen_HospitalDatabase
KingsleyUsen_HospitalDatabaseKingsleyUsen_HospitalDatabase
KingsleyUsen_HospitalDatabaseKingsley Usen
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfrajkumarm401
 
Define a class named Doctor whose objects are records for clinic’s d.pdf
Define a class named Doctor whose objects are records for clinic’s d.pdfDefine a class named Doctor whose objects are records for clinic’s d.pdf
Define a class named Doctor whose objects are records for clinic’s d.pdfMALASADHNANI
 
Brinkley – Over HereChanges during WWII led to an .docx
Brinkley – Over HereChanges during WWII led to an .docxBrinkley – Over HereChanges during WWII led to an .docx
Brinkley – Over HereChanges during WWII led to an .docxAASTHA76
 
Create an application that calculates the total cost of a hospit.docx
  Create an application that calculates the total cost of a hospit.docx  Create an application that calculates the total cost of a hospit.docx
Create an application that calculates the total cost of a hospit.docxAbdulrahman890100
 
BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++vikram mahendra
 
Teknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdf
Teknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdfTeknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdf
Teknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdfBayuSugiarno1
 
I need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfI need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfpnaran46
 
PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf
 PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf
PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdfannamalaiagencies
 
So I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdfSo I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdfarjuncollection
 
Using Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your DataUsing Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your DataMongoDB
 
i need help to edit the two methods below so that i can have them wo.pdf
i need help to edit the two methods below so that i can have them wo.pdfi need help to edit the two methods below so that i can have them wo.pdf
i need help to edit the two methods below so that i can have them wo.pdfirshadoptical
 
Branch in Time (a story about revision histories)
Branch in Time (a story about revision histories)Branch in Time (a story about revision histories)
Branch in Time (a story about revision histories)Tekin Suleyman
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 

Similar to Design various classes and write a program to computerize the billing.pdf (20)

Question I need help with c++ Simple Classes Assigment. i get this .pdf
Question I need help with c++ Simple Classes Assigment. i get this .pdfQuestion I need help with c++ Simple Classes Assigment. i get this .pdf
Question I need help with c++ Simple Classes Assigment. i get this .pdf
 
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docxINTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
INTERMIDIATE PROGRAMMINGCMPSC 122LAB 9 INHERITANCE AND POLYMO.docx
 
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfg++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
 
Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.Hospital management project_BY RITIKA SAHU.
Hospital management project_BY RITIKA SAHU.
 
TypeScriptで書くAngularJS @ GDG神戸2014.8.23
TypeScriptで書くAngularJS @ GDG神戸2014.8.23TypeScriptで書くAngularJS @ GDG神戸2014.8.23
TypeScriptで書くAngularJS @ GDG神戸2014.8.23
 
I keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfI keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdf
 
KingsleyUsen_HospitalDatabase
KingsleyUsen_HospitalDatabaseKingsleyUsen_HospitalDatabase
KingsleyUsen_HospitalDatabase
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdf
 
Define a class named Doctor whose objects are records for clinic’s d.pdf
Define a class named Doctor whose objects are records for clinic’s d.pdfDefine a class named Doctor whose objects are records for clinic’s d.pdf
Define a class named Doctor whose objects are records for clinic’s d.pdf
 
Brinkley – Over HereChanges during WWII led to an .docx
Brinkley – Over HereChanges during WWII led to an .docxBrinkley – Over HereChanges during WWII led to an .docx
Brinkley – Over HereChanges during WWII led to an .docx
 
Create an application that calculates the total cost of a hospit.docx
  Create an application that calculates the total cost of a hospit.docx  Create an application that calculates the total cost of a hospit.docx
Create an application that calculates the total cost of a hospit.docx
 
BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++BLOOD DONATION SYSTEM IN C++
BLOOD DONATION SYSTEM IN C++
 
Teknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdf
Teknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdfTeknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdf
Teknis _ Use Case Vital Sign, Procedure, Diet (2022-08-09).pdf
 
I need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfI need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdf
 
PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf
 PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf
PersonData.h#ifndef PersonData_h #define PersonData_h#inclu.pdf
 
So I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdfSo I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdf
 
Using Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your DataUsing Change Streams to Keep Up with Your Data
Using Change Streams to Keep Up with Your Data
 
i need help to edit the two methods below so that i can have them wo.pdf
i need help to edit the two methods below so that i can have them wo.pdfi need help to edit the two methods below so that i can have them wo.pdf
i need help to edit the two methods below so that i can have them wo.pdf
 
Branch in Time (a story about revision histories)
Branch in Time (a story about revision histories)Branch in Time (a story about revision histories)
Branch in Time (a story about revision histories)
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 

More from sktambifortune

Your company is preparing to migrate from IPv4 to IPv6, and you are .pdf
Your company is preparing to migrate from IPv4 to IPv6, and you are .pdfYour company is preparing to migrate from IPv4 to IPv6, and you are .pdf
Your company is preparing to migrate from IPv4 to IPv6, and you are .pdfsktambifortune
 
You are burning the latest song you bought on ITunes to a disk. The .pdf
You are burning the latest song you bought on ITunes to a disk. The .pdfYou are burning the latest song you bought on ITunes to a disk. The .pdf
You are burning the latest song you bought on ITunes to a disk. The .pdfsktambifortune
 
CASE 3-12 Information System Project Steering Committee The Informat.pdf
CASE 3-12 Information System Project Steering Committee The Informat.pdfCASE 3-12 Information System Project Steering Committee The Informat.pdf
CASE 3-12 Information System Project Steering Committee The Informat.pdfsktambifortune
 
Can you date the latest financial crisis in the United States or in .pdf
Can you date the latest financial crisis in the United States or in .pdfCan you date the latest financial crisis in the United States or in .pdf
Can you date the latest financial crisis in the United States or in .pdfsktambifortune
 
B1. State the components of organization. Give good examples to justi.pdf
B1. State the components of organization. Give good examples to justi.pdfB1. State the components of organization. Give good examples to justi.pdf
B1. State the components of organization. Give good examples to justi.pdfsktambifortune
 
Assignment of SOS operating systemThe file lmemman.c has one incom.pdf
Assignment of SOS operating systemThe file lmemman.c has one incom.pdfAssignment of SOS operating systemThe file lmemman.c has one incom.pdf
Assignment of SOS operating systemThe file lmemman.c has one incom.pdfsktambifortune
 
Any kind of help would gladly be appreciated. (C-programming)Probl.pdf
Any kind of help would gladly be appreciated. (C-programming)Probl.pdfAny kind of help would gladly be appreciated. (C-programming)Probl.pdf
Any kind of help would gladly be appreciated. (C-programming)Probl.pdfsktambifortune
 
Which of the following solutions will turn red litmus blue pOH 1.pdf
Which of the following solutions will turn red litmus blue pOH 1.pdfWhich of the following solutions will turn red litmus blue pOH 1.pdf
Which of the following solutions will turn red litmus blue pOH 1.pdfsktambifortune
 
What serves as the most reliable source of information about the .pdf
What serves as the most reliable source of information about the .pdfWhat serves as the most reliable source of information about the .pdf
What serves as the most reliable source of information about the .pdfsktambifortune
 
What is the difference between the terms “earnings and profits” and .pdf
What is the difference between the terms “earnings and profits” and .pdfWhat is the difference between the terms “earnings and profits” and .pdf
What is the difference between the terms “earnings and profits” and .pdfsktambifortune
 
what are three effects of transistor scaling on computer architectur.pdf
what are three effects of transistor scaling on computer architectur.pdfwhat are three effects of transistor scaling on computer architectur.pdf
what are three effects of transistor scaling on computer architectur.pdfsktambifortune
 
What are some of the motives for employee theft What are some .pdf
What are some of the motives for employee theft What are some .pdfWhat are some of the motives for employee theft What are some .pdf
What are some of the motives for employee theft What are some .pdfsktambifortune
 
Twitter is a popular social media. It allows its users to exchange tw.pdf
Twitter is a popular social media. It allows its users to exchange tw.pdfTwitter is a popular social media. It allows its users to exchange tw.pdf
Twitter is a popular social media. It allows its users to exchange tw.pdfsktambifortune
 
A. State the domai and ranga. 1. y find the inverse and state the dom.pdf
A. State the domai and ranga. 1. y find the inverse and state the dom.pdfA. State the domai and ranga. 1. y find the inverse and state the dom.pdf
A. State the domai and ranga. 1. y find the inverse and state the dom.pdfsktambifortune
 
The Puritan faith community shaped the New England colonies in virtu.pdf
The Puritan faith community shaped the New England colonies in virtu.pdfThe Puritan faith community shaped the New England colonies in virtu.pdf
The Puritan faith community shaped the New England colonies in virtu.pdfsktambifortune
 
savings account d. the value of the shares is based on the amount of .pdf
savings account d. the value of the shares is based on the amount of .pdfsavings account d. the value of the shares is based on the amount of .pdf
savings account d. the value of the shares is based on the amount of .pdfsktambifortune
 
QuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdf
QuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdfQuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdf
QuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdfsktambifortune
 
946 LTE Labs Le.chateliers-lab.pdf Before beginning this experiment.pdf
946 LTE Labs Le.chateliers-lab.pdf  Before beginning this experiment.pdf946 LTE Labs Le.chateliers-lab.pdf  Before beginning this experiment.pdf
946 LTE Labs Le.chateliers-lab.pdf Before beginning this experiment.pdfsktambifortune
 
Prove that the T_i-property is a topological property for i = 0So.pdf
Prove that the T_i-property is a topological property for i = 0So.pdfProve that the T_i-property is a topological property for i = 0So.pdf
Prove that the T_i-property is a topological property for i = 0So.pdfsktambifortune
 
4. Refer to the table of Gini coefficients in the Added Dimension box.pdf
4. Refer to the table of Gini coefficients in the Added Dimension box.pdf4. Refer to the table of Gini coefficients in the Added Dimension box.pdf
4. Refer to the table of Gini coefficients in the Added Dimension box.pdfsktambifortune
 

More from sktambifortune (20)

Your company is preparing to migrate from IPv4 to IPv6, and you are .pdf
Your company is preparing to migrate from IPv4 to IPv6, and you are .pdfYour company is preparing to migrate from IPv4 to IPv6, and you are .pdf
Your company is preparing to migrate from IPv4 to IPv6, and you are .pdf
 
You are burning the latest song you bought on ITunes to a disk. The .pdf
You are burning the latest song you bought on ITunes to a disk. The .pdfYou are burning the latest song you bought on ITunes to a disk. The .pdf
You are burning the latest song you bought on ITunes to a disk. The .pdf
 
CASE 3-12 Information System Project Steering Committee The Informat.pdf
CASE 3-12 Information System Project Steering Committee The Informat.pdfCASE 3-12 Information System Project Steering Committee The Informat.pdf
CASE 3-12 Information System Project Steering Committee The Informat.pdf
 
Can you date the latest financial crisis in the United States or in .pdf
Can you date the latest financial crisis in the United States or in .pdfCan you date the latest financial crisis in the United States or in .pdf
Can you date the latest financial crisis in the United States or in .pdf
 
B1. State the components of organization. Give good examples to justi.pdf
B1. State the components of organization. Give good examples to justi.pdfB1. State the components of organization. Give good examples to justi.pdf
B1. State the components of organization. Give good examples to justi.pdf
 
Assignment of SOS operating systemThe file lmemman.c has one incom.pdf
Assignment of SOS operating systemThe file lmemman.c has one incom.pdfAssignment of SOS operating systemThe file lmemman.c has one incom.pdf
Assignment of SOS operating systemThe file lmemman.c has one incom.pdf
 
Any kind of help would gladly be appreciated. (C-programming)Probl.pdf
Any kind of help would gladly be appreciated. (C-programming)Probl.pdfAny kind of help would gladly be appreciated. (C-programming)Probl.pdf
Any kind of help would gladly be appreciated. (C-programming)Probl.pdf
 
Which of the following solutions will turn red litmus blue pOH 1.pdf
Which of the following solutions will turn red litmus blue pOH 1.pdfWhich of the following solutions will turn red litmus blue pOH 1.pdf
Which of the following solutions will turn red litmus blue pOH 1.pdf
 
What serves as the most reliable source of information about the .pdf
What serves as the most reliable source of information about the .pdfWhat serves as the most reliable source of information about the .pdf
What serves as the most reliable source of information about the .pdf
 
What is the difference between the terms “earnings and profits” and .pdf
What is the difference between the terms “earnings and profits” and .pdfWhat is the difference between the terms “earnings and profits” and .pdf
What is the difference between the terms “earnings and profits” and .pdf
 
what are three effects of transistor scaling on computer architectur.pdf
what are three effects of transistor scaling on computer architectur.pdfwhat are three effects of transistor scaling on computer architectur.pdf
what are three effects of transistor scaling on computer architectur.pdf
 
What are some of the motives for employee theft What are some .pdf
What are some of the motives for employee theft What are some .pdfWhat are some of the motives for employee theft What are some .pdf
What are some of the motives for employee theft What are some .pdf
 
Twitter is a popular social media. It allows its users to exchange tw.pdf
Twitter is a popular social media. It allows its users to exchange tw.pdfTwitter is a popular social media. It allows its users to exchange tw.pdf
Twitter is a popular social media. It allows its users to exchange tw.pdf
 
A. State the domai and ranga. 1. y find the inverse and state the dom.pdf
A. State the domai and ranga. 1. y find the inverse and state the dom.pdfA. State the domai and ranga. 1. y find the inverse and state the dom.pdf
A. State the domai and ranga. 1. y find the inverse and state the dom.pdf
 
The Puritan faith community shaped the New England colonies in virtu.pdf
The Puritan faith community shaped the New England colonies in virtu.pdfThe Puritan faith community shaped the New England colonies in virtu.pdf
The Puritan faith community shaped the New England colonies in virtu.pdf
 
savings account d. the value of the shares is based on the amount of .pdf
savings account d. the value of the shares is based on the amount of .pdfsavings account d. the value of the shares is based on the amount of .pdf
savings account d. the value of the shares is based on the amount of .pdf
 
QuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdf
QuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdfQuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdf
QuestionIt was reported on June 11, 1997, by NBC Nightly News that.pdf
 
946 LTE Labs Le.chateliers-lab.pdf Before beginning this experiment.pdf
946 LTE Labs Le.chateliers-lab.pdf  Before beginning this experiment.pdf946 LTE Labs Le.chateliers-lab.pdf  Before beginning this experiment.pdf
946 LTE Labs Le.chateliers-lab.pdf Before beginning this experiment.pdf
 
Prove that the T_i-property is a topological property for i = 0So.pdf
Prove that the T_i-property is a topological property for i = 0So.pdfProve that the T_i-property is a topological property for i = 0So.pdf
Prove that the T_i-property is a topological property for i = 0So.pdf
 
4. Refer to the table of Gini coefficients in the Added Dimension box.pdf
4. Refer to the table of Gini coefficients in the Added Dimension box.pdf4. Refer to the table of Gini coefficients in the Added Dimension box.pdf
4. Refer to the table of Gini coefficients in the Added Dimension box.pdf
 

Recently uploaded

DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 

Recently uploaded (20)

DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 

Design various classes and write a program to computerize the billing.pdf

  • 1. Design various classes and write a program to computerize the billing system of a hospital. Design the class doctor Type, inherited from the class personType, defined in Chapter 10, 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. Design the class bill Type 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, access, and manipulate the data members. Design the class patientType, inherited from the class personType, defined in Chapter 10, 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. Solution Please find the code for the given problem with required classes //billType.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)
  • 2. { DrF = pDrF; } double billType::getDrF() const { return DrF; } void billType::setRmChg(double pRmChg) { RmChg = pRmChg; } double billType::getRmChg() const { return RmChg; } //billType.h #ifndef billType_H #define billType_H #include #include using namespace std; class billType { private : int PtID; double MedChg; double DrF; double RmChg; public: billType(int PtID = 0, double MedChg = 0, double DrF = 0, double RmChg = 0); void setMedChg(double MedChg); double getMedChg() const; void setDrF(double DrF); double getDrF() const; void setRmChg(double RmChg); double getRmChg() const;
  • 3. }; #endif billType_H //dateType.cpp #include #include "dateType.h" using namespace std; void dateType::setDate(int Month, int Day, int Year) { nMnth = Month; nDay = Day; nYr = Year; } int dateType::getDay() const { return nDay; } int dateType::getMonth() const { return nMnth; } int dateType::getYear() const { return nYr; } void dateType::printDate() const { cout << nMnth << "-" << nDay << "-" << nYr; } //Constructor with parameters dateType::dateType(int Month, int Day, int Year) { nMnth = Month; nDay = Day; nYr = Year; } //dateType.h
  • 4. #ifndef dateType_H #define dateType_H class dateType { public: void setDate(int Month, int Day, int Year); int getDay() const; int getMonth() const; int getYear() const; void printDate() const; dateType(int Month = 1, int Day = 1, int Year = 1900); private: int nMnth; int nDay; int nYr; }; #endif //doctorType.cpp #include "doctorType.h" doctorType::doctorType(string First, string Last ,string pDrSpec) { setName(First,Last); Spec = pDrSpec; } void doctorType::setSpec(string pDrSpec) { Spec = pDrSpec; } string doctorType::getSpec() { return Spec;
  • 5. } //doctorType.h #ifndef doctorType_H #define doctorType_H #include #include #include "personType.h" using namespace std; //inherits from personType class class doctorType : public personType { private : string Spec; public: //public member function of doctor class doctorType(string First = "", string Last = "", string Spec = ""); void setSpec(string Spec) ; string getSpec() ; }; #endif doctorType_H //main.cpp #include //Include header files #include "doctorType.h" #include "patientType.h" #include "dateType.h" #include "billType.h" using namespace std; int main() { //create an object of class doctorType doctor("Bob", "Evans", "Endocrinologist"); cout << "**********************************" << endl; cout << "** Doctor Details **" << endl; cout << "**********************************" << endl;
  • 6. cout << "** Dr. Name: " << doctor.getfName() << " " << doctor.getlName() << endl; cout << "** Specialty: " << doctor.getSpec() << endl; cout << "**********************************" << endl; cout << endl; //Create three dateType objects for date of birth, //admit date and dicahrage date dateType dtBth(10,12,1954); dateType admtDt(6,25,2015); dateType DcDt(7,1,2015); patientType patient("Don","Johnson", 12345, 60, dtBth, admtDt, DcDt, doctor); cout << "**********************************" << endl; cout << "** Patient Details **" << endl; cout << "**********************************" << endl; cout << "** Patient Name: " << patient.getfName() << " " << patient.getlName() << endl; cout << "** Patient ID: " << patient.getPtID() << endl; cout << "** Age: " << patient.getAge() << endl; cout << "** Date Of Birth: "; patient.getDoB().printDate(); cout << endl; cout << "**********************************" << endl; cout << endl; cout << "**********************************" << endl; cout << "** Visit Details **" << endl; cout << "**********************************" << endl; cout << "** Date of Admission: "; patient.getAdmtDt().printDate(); cout << " ** Date of Discharge: "; patient.getDcDt().printDate(); cout << " ** Doctor Name: "<< patient.getPcNm() << endl; cout << "**********************************" << endl; cout << endl; //create an instance of billType billType patientBill(10345,14900,1400,400); cout << "**********************************" << endl;
  • 7. cout << "** Billing Details **" << endl; cout << "**********************************" << endl; cout << "** Medicine Cost: " << patientBill.getMedChg() << endl; cout << "** Doctor Fee: " << patientBill.getDrF() << endl; cout << "** Room Charges: " << patientBill.getRmChg() << endl; cout << "** Total pay: " << patientBill.getMedChg() + patientBill.getDrF() + patientBill.getRmChg() << endl; cout << "**********************************" << endl; system("pause"); return 0; } //patientType.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) {
  • 8. 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() {
  • 9. return Dr.getfName().append(" " + Dr.getlName()); } //patientType.h #ifndef patientType_H #define patientType_H #include #include #include "personType.h" #include "dateType.h" #include "doctorType.h" using namespace std; class patientType :public personType { private: int PtID; int Age; dateType dtBth; dateType admtDt; dateType DcDt; doctorType Dr; public: patientType(string First, string Last, int PtID, int Age, dateType dtBth, dateType admtDt, dateType DcDt, doctorType Dr); void setPtID(int ID); int getPtID(); void setAge(int Age); int getAge(); void setDoB(dateType DoB); dateType getDoB(); void setAdmtDt(dateType AdmtDt); dateType getAdmtDt();
  • 10. void setDcDt(dateType DcDt); dateType getDcDt(); void setPcNm(doctorType Dr); string getPcNm(); }; #endif patientType_H //personType.cpp #include #include #include "personType.h" using namespace std; void personType::print() const { cout << fName << " " << lName; } void personType::setName(string First, string Last) { fName = First; lName = Last; } string personType::getfName() const { return fName; } string personType::getlName() const { return lName; } personType::personType(string First, string Last) { fName = First; lName = Last; } //personType.h #ifndef personType_H
  • 11. #define personType_H #include using namespace std; class personType { public: void print() const; void setName(string First, string Last); string getfName() const; string getlName() const; personType(string First = "", string Last = ""); protected: string fName; string lName; }; #endif personType_H