Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Question- Using Eclipse Any help and/or advice would help! Car Payment Calculator Program calculates monthly payments and total payment based on inputs for loan

Java Question- Using Eclipse

Any help and/or advice would help!

Car Payment Calculator

Program calculates monthly payments and total payment based on inputs for loan amount, interest rate, and number of years to pay off loan. This program gives practice in documentation and style standards, input and output, mathematical expressions, and assignment statements.

prompt user and get loanAmount from user as a real number * prompt user and get numberOfYears to pay off loan as an integer * calculate monthlyInterestRate: (annual rate / 12) * calculate monthlyPayment: (loanAmount * monthlyInterestRate) / 1 - (1 / (1 + monthlyInterestRate ) to the power of (numberOfYears * 12) * calculate totalPayment: (monthlyPayment * numberOfYears * 12) * output the monthlyPayment * output the totalPayment

loanAmount double input from user for loan amount * ANNUAL_INTEREST_RATE double constant for annual interest rate: 4.21% * numberOfYears int input from user for number of years to pay back loan

Test Case: LoanAmount- 5000 , numberOfYears- 3 , monthlyPayment- 148.08, totalPayment- 5331.14

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

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions