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
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up