Directions This exercise will provide you with the opportunity to utilize NetBeans to create an application that calculates interest. End Result: Console Create the Scanner object. Get the loan information from the end user by using the System class. Calculate the interest amount by using the BigDecimal class to make sure that all calculations are accurate. Format the interest rate, interest amount and loan amount and interest by using the NumberFormat abstract base class. It should round the interest that’s calculated to two decimal places, rounding up if the third decimal place is five or greater. The value for the formatted interest rate should allow for up to 3 decimal places. Display the results by using the System class. Assume that the user will enter valid double values for the loan amount and interest rate. The application should continue only if the user enters “y” or “Y” to continue.
Directions
This exercise will provide you with the opportunity to utilize NetBeans to create an application that calculates interest.
End Result: Console
Create the Scanner object.
Get the loan information from the end user by using the System class.
Calculate the interest amount by using the BigDecimal class to make sure that all calculations are accurate.
Format the interest rate, interest amount and loan amount and interest by using the NumberFormat abstract base class. It should round the interest that’s calculated to two decimal places, rounding up if the third decimal place is five or greater. The value for the formatted interest rate should allow for up to 3 decimal places.
Display the results by using the System class.
Assume that the user will enter valid double values for the loan amount and interest rate.
The application should continue only if the user enters “y” or “Y” to continue.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images