Previous
0 / 15
Module DEMO-33-72DEMO-OOP-33

Clinic Appointment Inheritance

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a clinic-appointment subclass that extends an appointment base class and prints the payable amount after insurance.

Input Format

Input is given as whitespace-separated tokens for the base-class fields first, followed by the child-class fields.

Output Format

Print the exact multiline report required by the problem.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
Lina
20.0
5.0
Patient: Lina
Fee: 20.00
Payable: 15.00
Input: patient name = "Lina", appointment fee = 20.0, insurance coverage = 5.0.
Key calculation(s): "Patient: " + "Lina" = "Patient: Lina" | "Fee: " + String.format("%.2f", 20.0) = "Fee: 20.00".
Output:
Patient: Lina
Fee: 20.00
Payable: 15.00
Sample #2
Public sample
Omar
35.5
10.5
Patient: Omar
Fee: 35.50
Payable: 25.00
Input: patient name = "Omar", appointment fee = 35.5, insurance coverage = 10.5.
Key calculation(s): "Patient: " + "Omar" = "Patient: Omar" | "Fee: " + String.format("%.2f", 35.5) = "Fee: 35.50".
Output:
Patient: Omar
Fee: 35.50
Payable: 25.00

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings