014-007-003
final Method: Unchangeable Processing
Easy
Problem Description
final method: Unchangeable Processing
In this problem, you will create a program that receives an amount, calculates the tax-inclusive price using a method marked with the final modifier, and displays the result to standard output.
Learning Objective: Understand final method characteristics and use correctly
Confirm that final methods cannot be overridden and understand their purpose.
Input
1 line: Amount (integer)
Output
Base price: [amount]
Tax (10%): [tax]
Total: [total]
Example
Input:
1000
Output:
Base price: 1000
Tax (10%): 100
Total: 1100
Test Cases
※ Output examples follow programming industry standards
Normal case
Input:
800
Expected Output:
Base price: 800 Tax (10%): 80 Total: 880
Normal case
Input:
500
Expected Output:
Base price: 500 Tax (10%): 50 Total: 550
Your Solution
Current Mode:● My Code
PriceCalculator.java🔒
Main.java🔒
2/6 ファイル100B
⚠️警告
- No main method found
9
1
2
3
4
›
⌄
import java.util.Scanner;
class PriceCalculator {
}
0 B / 5 MB
You have 10 free executions remaining
