Lab08

.docx

School

Wayne State University *

*We aren’t endorsed by this school

Course

3020

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by MateMandrill3698

CSC 3020 Java Programming Lab 08 25 points Due 11/2/2023 In Class All assignments must be submitted by the Canvas. No email or hard copy is accepted. You must follow the following format: 1. include only the source file for each problem. 2. Submit your file to the Canvas. You must submit your assignment on time; otherwise, you will receive zero. In addition, you cannot submit your file more than one time . 3. There will be several folders on the Canvas. You need to upload your file(s) using the correct folder on the Canvas. 4. Name each file: “ AccessID _Lab08.docx 5. To upload your file(s): 1. In Course Navigation, click the Assignments link. 2. Click the title of the Lab. 3. Click the Submit Lab button. 4. Add File . ... 5. Submit Assignment. ... 6. View Submission . It is your responsibility to make sure that each file is uploaded correctly. If you uploaded a wrong file, you receive zero; files will not be accepted after due date even if you have a prove that the file is created before the due date. Your program should be free of syntax errors (i.e. it must compile). If it does not, you will receive a zero. Solution to this assignment will not be posted on Canvas; however, any question can be discussed in the class upon request of a student. Each solution text file MUST have the following flower box comment along with labels. I would copy this into your code.: /******************************************************************** Name: Access ID: Date: mm/dd/yyyy *******************************************************************/
CSC 3020 Java Programming Lab 08 25 points Due 11/2/2023 In Class Hospital Billing System (25 Points) In this project, you will design a class and write a program to computerize the billing system of a hospital. 1. (1 point) Create a UML for the 4 classes described below. 2. (2 points) Design the class Person . Two common attributes of a person are the person’s first name and last name. The typical operations on a person’s name are to set the name and print the name. 3. (2 points) Design the class Doctor , inherited from the class Person with an additional data member to store a doctor’s specialty. Add appropriate constructors and methods to initialize, access, and manipulate the data members. 4. (4 points) Design the class Bill with data members to store a patient’s ID and the patient’s hospital charges such as pharmacy charges for medicine, the doctor’s fee, and the room charges. Add appropriate constructors and methods to initialize, access, and manipulate the data members. 5. (4 points) Design the class Patient , inherited from the class Person with additional data members to store a patient’s ID, date of birth, attending physician’s name, the date when the patient was admitted in the hospital, and the date when the patient was discharged from the hospital. Add appropriate constructors and methods to initialize, access, and manipulate the data members. 6. (3 points) Override method toString in each of the above classes. 7. (9 points) Write a program (TestHospital class) to test your classes. Print patient’s name, attending physician, admit date, discharge date, and all charges to console window. Your printout must match the sample output below. Your program should process more than one patient.
CSC 3020 Java Programming Lab 08 25 points Due 11/2/2023 In Class Please keep these points in mind: 3 points will be deducted for not including comments. 2 points will be deducted for not having at least 2 billing examples. 0.5 point will be deducted for EACH instance of not formatting dates mm/dd/yyyy. 0.5 point will be deducted for EACH instance for not formatting dollar amounts $#,##0.00 1 point will be deducted for incorrect bill total. 2 points will be deducted for not making a reasonable attempt to match output. There should be at least 3 scenarios: Perfect Example of entering and outputting requested data for 2 patients. Examples of entering incorrect date, and prompting for a correct date. Examples of entering incorrect dollar amounts, and prompting for a correct one.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help