Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design the class doctorType, inherited from the class personType, with an additi

ID: 440527 • Letter: D

Question

Design the class doctorType, inherited from the class personType, with an additional data member to store doctors speciality. Add appropriate constructors and member functions to initialize, access, and manipulate the data members. B. design the class billtype with data members to store patients Id and patients hospital charges. Add appropriate constructors and member functions to initialize, access and manipulate the data members. C. Design the class patienttype , inherited from the class personType, with additional data members to store a patients Id, age, date of birth, attending physicians name, and the date the patient was discharged from the hospital. Use the class date type to store the date of birth, admit date, discharge date, and class doctorType, to store attending physicians name. Add appropriate constructors and member functions to initialize, access and manipulate the data members.

Explanation / Answer

a) class personType { protected: String name; String address; public: void setName(String s) { this.name=s; } void setAddress(String address) { this.address = address; } public String getName() { return name; } public String getAddress() { return address; } }; // Derived class class doctorType: personType { protected String speciality; public: void setSpeciality(String spec) { this.speciality=spec; } String getSpeciality() { return speciality; } }; Similarly others can be found refer this http://www.tutorialspoint.com/cplusplus/cpp_inheritance.htm

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote