ABC Community Hospital Java Code

User Generated

ncenqrrc92

Programming

Description

Alldetails attached. Write a class called Hospital that accepts the following indicators:

  • A five digit string value representing the patient identification number
  • The patient’s name (First name and last name)
  • An integer representing the number of days the patient is in the hospital.
  • A single character representing the type of room the patient chooses. Room type (P/p= private, S/s means semi-private, and W/w means ward)

As part of the billing, note the following:

  • If a patient chooses private room, the cost for medication is twice what it is shown on the billing chart; if the patient chooses semi-private, then the cost for medication is what is shown on the billing chart; and if the patient chooses ward, then the medication cost is half what is shown on the billing chart.
  • A patient who chooses private room pays for television service and telephone service; a patient who chooses semi-private room pays for television service, and a patient who chooses the ward gets television and telephone services free. These are flat fees (one time fees).

Unformatted Attachment Preview

Assignment 5 The ABC Community Hospital needs a program to compute and print the billing statement for each of its patient. The following table shows the fees for the various services: The ABC Community Hospital Room Type and Charges per Day: Private Semi-private Ward $550.0 $350.0 $105.00 Flat Fees Telephone Television $4.50 $7.50 Medication Base fee $275.00 Write a class called Hospital that accepts the following indicators: • A five digit string value representing the patient identification number • The patient’s name (First name and last name) • An integer representing the number of days the patient is in the hospital. • A single character representing the type of room the patient chooses. Room type (P/p= private, S/s means semi-private, and W/w means ward) As part of the billing, note the following: • If a patient chooses private room, the cost for medication is twice what it is shown on the billing chart; if the patient chooses semi-private, then the cost for medication is what is shown on the billing chart; and if the patient chooses ward, then the medication cost is half what is shown on the billing chart. • A patient who chooses private room pays for television service and telephone service; a patient who chooses semi-private room pays for television service, and a patient who chooses the ward gets television and telephone services free. These are flat fees (one time fees). A typical output is as follows The ABC Community Hospital Patient Billing Statement Patient: John Harris Number of days: 5 Type of room: Private Room charge …………… $2,750.00 Telephone ………………. $4.50 Television ……………… .$7.50 Medication ……………… $550.00 Total amount due ……………..$3,312.00 Note: • Use the switch statement to determine the room type, and • Use the if/else statement to determine the other items
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

View attached explanation ...

Similar Content

Related Tags