Question: C++ programing, thank you so much. This lab will exercise your understanding of some of the concepts covered in Chapter 11:classes, inheritance1. Design the class

C++ programing, thank you so much.

This lab will exercise your understanding of some of the concepts covered in Chapter 11:classes, inheritance1. Design the class patientType, inherited from class persontype, withadditional data members to store a patient's ID, age, date of birth,the date the patient was admitted in the hospital, and the date the patient was discharged.The data members must be private.2. Add appropriate constructors and member functions to initialize, access andmanipulate data members.3. Code a test program that creates a new patient. Test the classes as follows:Create a patientType object.Request the patient ID, First Name, Last NameSet the values in the object appropriatelyThe date of birth, admission date and discharge dates may be set using hard-coded values or requested.Set these values for the patientType objectPrint the patientType object information:First Name, Last Name, Admission Date, Discharge Date,Date of birthComplete as much as you can before you leave ensuring what you've completed compiles. These labs areentirely for your practice.The program may be named any name of our choice and must have a .cpp extention; variables may be any nameof your choice.You DO NOT have to comment these programs, however, please include your NAME as a comment in ALL code files.SUBMIT the code (*.cpp, *.h) and your project file (for Dev C++ is *.dev, for codeblocks it is *.cbp).All files must be submitted and the program MUST compile and run to get credit. The project files donot contain the code files, so please submit all files.You MAY zip the files and submit the zipped files.Questions will be entertained; solution will be discussed in class. This is a collaborative effort to provide examples and practice for your understanding.

C++ programing, thank you so much. This lab will exercise your understanding

of some of the concepts covered in Chapter 11:classes, inheritance1. Design the

#ifndef H_personType #define H_personType #include using namespace std; class personType { public: void print() const; //Function to output the first name and last name //in the form firstName lastName. void setName(string first, string last); //Function to set firstName and lastName according //to the parameters. //Postcondition: firstName = first; lastName = last string getFirstName() const; //Function to return the first name. //Postcondition: The value of the data member firstName is returned. string getLastName() const; //Function to return the last name. //Postcondition: The value of the data member lastName // is returned. personType(string first = "", string last = ""); //constructor //Sets firstName and lastName according to the parameters. //The default values of the parameters are empty strings. //Postcondition: firstName = first; lastName = last private: string first Name; //variable to store the first name string lastName; 1/variable to store the last name }; #endif 11 Author: D.S. Malik 11 // Implementation file personTypeImp.cpp // This file contains the definitions of the functions to // implement the operations of the class personType. //** **** #include #include #include "personType.h" using namespace std; void personType: :print() const { cout

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!