Question: Write a java code : Program Description A Physical Therapist ( PT ) offers orthopedic and electrotherapy sessions for individuals who are recovering from injury.
Write a java code :
Program Description
A Physical Therapist PT offers orthopedic and electrotherapy sessions for individuals who are recovering from injury. The PT charges different hourly rates based on the type of physical therapy, where an orthopedic therapy session costs $ per hour and electrotherapy sessions cost $ per hour. Write a Java program that calculates the bill for a therapy session with the PT The program must:
Ask the user to select the type of therapy session orthopedic or electrotherapy
a If an invalid session type is entered, the rate for an orthopedic session will be applied by default.
Prompt the user to enter the duration of the physical therapy session in minutes. The PT requires users to book a minimum of minutes for a session. The maximum duration allowed for a session is minutes.
b If an invalid duration is entered, a standard session length of minutes will be booked automatically.
Calculate the duration of the session in hours. The spa charges hour for every minutes of a physical therapy session duration.
Offer a special discount for users who enter the insurance code: CPCCHEAL Prompt the user to enter the insurance code.
c If no insurance code or an invalid insurance code is entered, no discount will be applied.
Calculate the charge for the physical therapy session. The amount due is the product of the total hours of the session and the hourly rate based on the type of physical session. Apply the discount code as necessary to the charge.
Display the type of physical therapy session, the duration of the session in hours, the hourly rate for the session, the subtotal session charge before discount the discounted amount if applicable and the final amount due for the session.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
