Question: Written in Java please Task Mortgage java: Write a java program that takes several lines of input from the standard input stream, First line: L-loan

 Written in Java please Task Mortgage java: Write a java program
Written in Java please

Task Mortgage java: Write a java program that takes several lines of input from the standard input stream, First line: L-loan amount Second line: l-interest rate per period Following lines: reads payments from the standard input stream and shows the result in standard output stream 1. Each payment represents the passage of a single period of the loan 2. For each payment the program computes the interest on the current balance, adds it to the balance, and then subtracts the payment from the balance. The interest is the rate times the balance rounded (ROUND_HALF_UP) to the nearest penny. 3. Each time the string "balance" (regardless of the case) appears in the input the program prints the balance. 4. For a positive balance print the word 'left after the number, for negative balance print 'over', and for zero print 0.00 and nothing afterwards 5. Each payment, and not a balance inquiry, represents one period; no matter how many times the word "balance" appears the number of loan periods does not change. 6. If there are no balance inquiries, then the program has no output Sample Input 100.00 0.01 balance BALANCE In Java Please 10.00 20.00 Balance 100.00 balance Sample Output balance: 100.00 left balance: 100.00 left balance: 71.91 left balance: 27.37 over

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!