Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Amortization Table: I am trying to write Java code that prints out a monthly breakdown of interest, payment amount, and remaining balance. Inputs received

Java Amortization Table:

I am trying to write Java code that prints out a monthly breakdown of interest, payment amount, and remaining balance. Inputs received from the user include percent to pay and initial balance. I have written a while loop, but it keep outputting as an infinite loop and I'm not sure what I'm doing wrong.

image text in transcribed

int month1; double interestAmt 0.015 double calc 0; double pmt -0; //HEADER System.out.println("First Name: "firstName); System.out.println("Last Name: "lastName); System.out.print1n("Account #: " + accountNum); System.out.println("Balance Due: "currentBalance); System.out.println("Percent to Pay:"percentToPay); System.out.println"); System.out.println("Credit Payment Schedule); System.out.printlnC" Customer: "firstName"lastName); System.out.print1n("Account #. " + accountNum); System.out.println("Balance Due: " currentBalance); System.out.println(""; System.out.println("" System.out.println("Month Interest Payment Balance"); while (currentBalance> 0) 1 calc-interestAmt*currentBalance; pmt-(calc currentBalance)/percentToPay; current Balance -(currentBalance calc) - pmt; if (calc pmtcurrentBalance) I break; " Cpmt)" System. out.println("month " month++ ""$" +(calc)+ " $" (currentBalance))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Describe the five components of the triggers sheet that Kirk used.

Answered: 1 week ago

Question

5. Describe how contexts affect listening

Answered: 1 week ago