Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

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 »
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 bo
ow or deposit)
  = annual rate of interest (as a decimal)
t = number of years the amount is deposited or bo
owed 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:
Bo
ower’s Name:
Bo
ower’s Address:
Bo
ower’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 Day May 06, 2021

Solution

Aditya answered on May 09 2021
150 Votes
package loanmonthlypayment;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Loanmonthlypayment {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int userChoice;
String bo
owerName;
String bo
owerAddress;
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 Bo
ower Name");
bo
owerName = sc.next();
System.out.println("Enter Bo
ower Address");
bo
owerAddress = sc.next();
System.out.println("Enter Bo
ower 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