Create an application that calculates the total cost of a hospital stay. The daily base charge is $350. The hospital also charges for medication, surgical fees, lab fees, and physical rehab. The application should accept the following input:• The number of days spent in the hospital• The amount of medication charges• The amount of surgical charges• The amount of lab fees• The amount of physical rehabilitation charges Create and use the following value-returning methods in the application:• CalcStayCharges—Calculates and returns the base charges for the hospital stay. This is computed as $350 times the number of days in the hospital.• CalcMiscCharges—Calculates and returns the total of the medication, surgical, lab, and physical rehabilitation charges.• CalcTotalCharges—Calculates and returns the total charges.
Create an application that calculates the total cost of a hospital stay. The daily base charge is $350. The hospital also charges for medication, surgical fees, lab fees, and physical rehab. The application should accept the following input:
• The number of days spent in the hospital
• The amount of medication charges
• The amount of surgical charges
• The amount of lab fees
• The amount of physical rehabilitation charges Create and use the following value-returning methods in the application:
• CalcStayCharges—Calculates and returns the base charges for the hospital stay. This is computed as $350 times the number of days in the hospital.
• CalcMiscCharges—Calculates and returns the total of the medication, surgical, lab, and physical rehabilitation charges.
• CalcTotalCharges—Calculates and returns the total charges.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images