Question: Code should be in java format Do Project 3-3 from the workbook. It's not necessary to use the java.Math.BigDecimal . You can achieve the same
Code should be in java format
Do Project 3-3 from the workbook. It's not necessary to use the java.Math.BigDecimal. You can achieve the same results using NumberFormat objects.You will need a Currency Instance and a Percent Instance. You can do all of the formatting required without using the BigDecimal. You are welcome to use that, though, instead of the NumberFormat.
Do Exercise 4 using System.out.printf instead of System.out.println. Each format should print 3 variables (String or integer, depending on the data you're printing) Integers should be right-justified and use separators. Each item that is printed should occupy 8 spaces. You can separate the printed items by using tab characters in the format string.

Project 4-1: Display a table of powers Console Welcome to the Squares and Cubes table Project 3-3: Calculate interest Console Welcome to the Interest Calculator Enter loan amount: 520000 Enter interest rate: .05379 Loan amount: $520,000.00 Interest rate: 5.3758 Interest $27.950.00 Enter an integer: 9 Number Squared Cubed Continue? (y): Y Enter loan amount: 4944.5 Enter interest rate: .01 1 2 3 4 5 6 7 B 9 1 4 9 16 25 36 49 64 81 1 8 27 64 125 216 343 512 729 Loan amount: Interest rate: Interest: $4,944.50 16 $49.45 Continue? (y): Y Enter an integer: 3 Number Squared Cubed 1 1 2 3 1 8 27 9 Continue? (y): m Continue? (y): n Press any key to continue... Operation The application prompts the user to enter a loan amount and an interest rate. The application calculates the interest amount and formats the loan amount, interest ratc, and interest amount. Then, it displays the formatted results to the user. The application prompts the user to continue. Specifications This application should use the BigDecimal class to make sure that all calculations rounding up if the third decimal place is five or greater. re accurate. It should round the interest that's calculated to two decimal places, The value for the formatted interest rate should allow for up to 3 decimal places. 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. Press any key to continue Operation The application prompts the user to enter an integer. The application displays a table of squares and cubes from 1 to the value entered by the user The application prompts the user to continue Specifications The formulas for calculating squares and cubes are: square - X3 cube = xxx Assume that the user will enter a valid integer The application should continue only if the user enters "y" or "Y" to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
