Previous Next
0 / 10
Module DEMO-33-64DEMO-OOP-33

Invoice Service Project

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create Main.java and InvoiceService.java.

Read quantity and unit price, then use the service class to print Total invoice = X.00 with two decimal places.

Sample Testcases

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

Sample #1
Public sample
3 4.5
Total invoice = 13.50
Input: quantity = 3, unit price = 4.5.
Key calculation: total = 3 * 4.5 = 13.50.
Output:
Total invoice = 13.50
Sample #2
Public sample
10 2
Total invoice = 20.00
Input: quantity = 10, unit price = 2.
Key calculation: total = 10 * 2 = 20.00.
Output:
Total invoice = 20.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