Questions #2: Assets Depreciation Program Businesses fixed assets, such as buildings, equipment, machinery, and furniture, depreciate over the years of usage. The yearly depreciation in value D for an asset is usually computed using the formula: D = (P – S) / Y where P is the asset purchase price in $, S is the salvage value in $, and Y is the number of years the asset is used. Write a Java program, named A1_Q2, which: 1. Display a welcome message. 2. Prompts the user to enter the three values in the same order (i.e., P, S, and Y) as a single input separated by spaces between them. 3. Computes the yearly depreciation in $, and yearly percentage depreciation, and number of years the value gets depreciated to 50% of purchase price of the asset. Your program must print the results in two decimal digits rounded. 4. Display a farewell message, so that the user knows that the program has terminated normally, example Thank you for using Asset depreciation tool. See you next time.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Questions #2: Assets Depreciation Program
Businesses fixed assets, such as buildings, equipment, machinery, and furniture, depreciate over
the years of usage.
The yearly depreciation in value D for an asset is usually computed using the formula:
D = (P – S) / Y
where P is the asset purchase price in $, S is the salvage value in $, and Y is the number of years
the asset is used.
Write a Java program, named A1_Q2, which:
1. Display a welcome message.
2. Prompts the user to enter the three values in the same order (i.e., P, S, and Y) as a single
input separated by spaces between them.
3. Computes the yearly depreciation in $, and yearly percentage depreciation, and number
of years the value gets depreciated to 50% of purchase price of the asset. Your program
must print the results in two decimal digits rounded.
4. Display a farewell message, so that the user knows that the program has terminated
normally, example
Thank you for using Asset depreciation tool.
See you next time.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images