Java Project: Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a file. Menu...

1 answer below »
Beginners java coding


Java Project: Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a file.   Menu will be the following: Enter (1) to calculate your loan monthly payment Enter (2) to calculate your loan monthly payment & write to a file     Tips: Compound Interest Formula   A = P (1 + r / n) ^ nt   P = principal amount (the initial amount you borrow or deposit) r  = annual rate of interest (as a decimal) t = number of years the amount is deposited or borrowed for. A = amount of money accumulated after n years, including interest. n  =  number of times the interest is compounded per year    You can visit here for further assistance - http://www.calculatorsoup.com/calculators/financial/compound-interest-calculator.php Bottom line, you will be displaying something like the following: Borrower’s Name: Borrower’s Address: Borrower’s Phone: Loan Amount: Interest Rate (APR): Fixed Monthly Payment:   Note – always with the option to display in a file or on the screen.
Answered Same DayMay 06, 2021

Answer To: Java Project: Write a menu driven program, which would compute compound interest and a monthly...

Aditya answered on May 09 2021
134 Votes
package loanmonthlypayment;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.S
canner;
public class Loanmonthlypayment {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int userChoice;
String borrowerName;
String borrowerAddress;
int mobileNumber;
float p;
float r;
float R;
float t;
int n;
System.out.println("Enter (1) to calculate your loan monthly payment");
System.out.println("Enter (2) to calculate your loan monthly payment & write to a file");
userChoice = sc.nextInt();
switch(userChoice)
{
case 1:
{
System.out.println("Enter Borrower Name");
borrowerName = sc.next();
System.out.println("Enter Borrower Address");
borrowerAddress = sc.next();
System.out.println("Enter Borrower Phone Number");
mobileNumber = sc.nextInt();
System.out.println("Enter The Principal Amount(P)");
p = sc.nextFloat();
System.out.println("Enter The Annual Rate Of Interest(R)");
R = sc.nextFloat();
System.out.println("Enter The...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here