please assist with writing this code given the listed instructions
1. Design the class patient Type, inherited from class persontype, with additional 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 and manipulate data members. 3. Code a test program that creates a new patient. Test the classes as follows: Create a patient Type object. Request the patient ID, First Name, Last Name Set the values in the object appropriately The date of birth, admission date and discharge dates may be set using hard-coded values or requested. Set these values for the patient Type object Print the patient Type object information: First Name, Last Name, Admission Date, Discharge Date, Date of birth Complete as much as you can before you leave ensuring what you've completed compiles. These labs are entirely for your practice. The program may be named any name of our choice and must have a .cpp extention; variables may be any name of your choice. You DO NOT have to comment these programs. 1 / Author: D.s. Malik // class person Type // This class specifies the members to implement a person's // first name and last name. //***** ****** #ifndef _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 first Name lastName. void setName(string first, string last); //Function to set first Name 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 firstName; //variable to store the first name string lastName; //variable to store the last name #endit // Author: D.S. Malik // // Implementation file personType Imp.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