Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Payment Schedule: Currently trying to put the code present in my while loop into a method OUTSIDE of the main method that can be
Java Payment Schedule: Currently trying to put the code present in my while loop into a method OUTSIDE of the main method that can be called from the main method (similar to how the 2 methods I have outside of main are called from main). I am having trouble figuring out how to do this. I need an amortization schedule to be printed when the method is called from main.
import Java.UtlL.*, public class Part2 I Scanner scnr-new Scanner(System. in); public double getBalanceO double currentBalance - scnr.nextDoubleQ; return currentBalance; public double getPercentO double percentToPayScnr.nextDoubleQ; return percentToPay; SEPARATION OFCLASS public static void main(String[ args)i Part2 obj = new Part20; Scanner scnr-new Scanner(System. in); int month-1; double calc; double interestAmt - 0.015; double pmt; String firstNamescnr.nextO; String lastNamescnr.nextO; int accountNum = scnr.nextInt(); double curBalobj.getBalance); double percentToPayobj.getPercentQ; System.out.println(" First Name:"firstName); System.out.printlnC" Last Name"lastName); System.out.println(" Account # : " + accountNum); System.out.printlnC" Balance Due: " + curBal); //III System.out.printlnC" Percent to PaypercentToPay); System.out.println(""); System.out.printlnC"Credit Payment Schedule"; System.out.printlnC" Customer:"firstName"lastName); System.out .print1n(" Account # : " + accountNum); System.out.printlnC" Balance Due: " + curBal); 1/1 System.out.println(""); System.out.printlnC"- System.out.printlnC"Month Interest Payment Balance"); double initial_monthly_payment(percentToPay* curBal) / 100; while (curBal > 0.00) i calc-(interestAmt curBal); if (curBalStep 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