Question: Question: (Java) We like to computerize the billing system of a hospital. * Design a class named personType, with 3 private member fields to store

Question: (Java) We like to computerize the billing system of a hospital.

* Design a class named personType, with 3 private member fields to store the first name, last name, and gender of a person. Define a constructor to set values to the member fields. Define accessor and mutator methods for the private member fields. Define a toString() method to return the values of the member fields.

* Design a class named dateType, with 3 private member fields to store the month number, day number, and year number (all integers). Define a constructor and define the mutator and accessor methods. Define a toString() method to return the values of the member fields.

* Design a class named billType with data members to store a patients ID and a patients hospital charges such as pharmacy charges for medicine, doctors fee, and room charges. Add appropriate constructors and member methods to initialize, access, and manipulate data members.

* Design a class named doctorType inherited from the class personType with an additional member to store a doctors specialty. Add appropriate constructors and member methods to initialize, access, and manipulate data members.

* Design a class named patientType inherited from the class personType with additional data members to store a patients ID, age, date of birth, attending physicians name, the date when the patient was admitted to the hospital, and the date when the patient was dismissed from the hospital. IMPORTANT NOTE: use the class dateType to store the date of birth, admit date, discharge date (Month, Day, Year). Use the class doctorType to store the attending physicians name. Add appropriate constructors and member methods to initialize, access, and manipulate data members.

Your main program file must have code to properly test all your classes by creating various objects using the different constructors. I also need you to show the definition and use of an array of patients using the patientType class. Your testing must be complete. For example, one should be able to enter data for a set of patients and be able to see the results outputted to the screen. Avoid minimal testing of your code. The program must also have some way of processing input as you test your code.

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!