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

Subscription Billing Engine

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create Main.java and SubscriptionBill.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
Basic
10.0
16.0
Plan: Basic
Total: 11.60
Input: plan = "Basic", base price = 10.0, tax rate = 16.0.
Key calculation(s): "Plan: " + "Basic" = "Plan: Basic" | "Total: " + String.format("%.2f", getBasePrice() * (1 + (getTaxRate() / 100.0))) = "Total: 11.60".
Output:
Plan: Basic
Total: 11.60
Sample #2
Public sample
Pro
25.0
8.0
Plan: Pro
Total: 27.00
Input: plan = "Pro", base price = 25.0, tax rate = 8.0.
Key calculation(s): "Plan: " + "Pro" = "Plan: Pro" | "Total: " + String.format("%.2f", getBasePrice() * (1 + (getTaxRate() / 100.0))) = "Total: 27.00".
Output:
Plan: Pro
Total: 27.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