Previous Next
0 / 15
Module DEMO-33-70DEMO-OOP-33

Parking Session Manager

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create Main.java and ParkingSession.java.

Implement the class using private fields plus getters and setters.

Use the object to print the required report exactly as described.

Input Format

Input is given as whitespace-separated tokens in the order stated in the question.

Output Format

Print the exact multiline report required by the question.

Sample Testcases

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

Sample #1
Public sample
A1
3
1.5
Plate: A1
Charge: 4.50
Input: plate = "A1", hours = 3, hourly rate = 1.5.
Key calculation(s): "Plate: " + "A1" = "Plate: A1" | "Charge: " + String.format("%.2f", 3 * getHourlyRate()) = "Charge: 4.50".
Output:
Plate: A1
Charge: 4.50
Sample #2
Public sample
B2
1
2.0
Plate: B2
Charge: 2.00
Input: plate = "B2", hours = 1, hourly rate = 2.0.
Key calculation(s): "Plate: " + "B2" = "Plate: B2" | "Charge: " + String.format("%.2f", 1 * getHourlyRate()) = "Charge: 2.00".
Output:
Plate: B2
Charge: 2.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