Please and thank you! Mad props and bump to who ever gets it. In this exercise y
ID: 3659254 • Letter: P
Question
Please and thank you! Mad props and bump to who ever gets it. In this exercise you will design various classes and write a program to computerize the billing system of a hospital. A. 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. Write a program to test your classes.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
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.