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

Invoice Formatter Toolkit

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a helper class that formats an item tag and prints the invoice total using Java formatting utilities.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. item code
  2. quantity
  3. unit price

Output Format

Print the exact report in this order:

  1. Item Tag
  2. Total

Sample Testcases

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

Sample #1
Public sample
book
2
4.5
Item Tag: BOOK-2
Total: 9.00
Input: item code = "book", quantity = 2, unit price = 4.5.
Key calculation(s): total = 2 * 4.5 | itemTag = "book".toUpperCase() + "-" + 2 | "Item Tag: " + itemTag = "Item Tag: BOOK-2".
Output:
Item Tag: BOOK-2
Total: 9.00
Sample #2
Public sample
pen
10
1.2
Item Tag: PEN-10
Total: 12.00
Input: item code = "pen", quantity = 10, unit price = 1.2.
Key calculation(s): total = 10 * 1.2 | itemTag = "pen".toUpperCase() + "-" + 10 | "Item Tag: " + itemTag = "Item Tag: PEN-10".
Output:
Item Tag: PEN-10
Total: 12.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