Question
Hi, I already have part of the code. The modification must be done inside the pre-existing code. Also, there have been several answers for this
Hi, I already have part of the code. The modification must be done inside the pre-existing code.
Also, there have been several answers for this problem, the helped need is more toward putting the code inside the pre-existing one. This solution has been proposed:
https://www.chegg.com/homework-help/questions-and-answers/write-java-output-exactly-programming-challenge-description-person-taken-loan-600000-fixed-q30739702
https://www.chegg.com/homework-help/questions-and-answerseed-help-writing-java-program-reads-text-file-following-information-1-calculate-monthly-p-q23546407
The problem:
Pre-existing code that must be modified:
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets;
public class Main { /** * Iterate through each line of input. */ public static void main(String[] args) throws IOException { InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); BufferedReader in = new BufferedReader(reader); String line; while ((line = in.readLine()) != null) { System.out.println(line); } } }
Programming Challenge Description: A person has taken a loan of $6000.00 with a fixed annual interest rate of 6% for 5 years with no down payment. The monthly payment has been fixed at $116.00 for entire term of the loan. Here is the formula to calculate monthly fixed payment: NOTE: See attachment) P = (monthly rate * Loan amount) / (1- (1-monthly intere st rate)A-n) Here n is the number of payment periods Write a program to: 1. To calculate monthly payment 2. To print out monthly payment and total interest payment for the duration of loan rounded to its nearest integer Input: 6000~5 6~0 Output: $116.00~$960 Test 1 Test Input 25000 10 6 O Expected Output $277.55 $8306
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started