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 $75.55 per hour and electrotherapy sessions cost $43.77 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 40 minutes for a session. The maximum duration allowed for a session is 120 minutes.
b. If an invalid duration is entered, a standard session length of 50 minutes will be booked automatically.
Calculate the duration of the session in hours. The spa charges 1 hour for every 40 minutes of a physical therapy session duration.
Offer a special 35% discount for users who enter the insurance code: CPCCHEAL24!. 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.
Write a java code : Program Description A

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 Programming Questions!