Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

image text in transcribed

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 (curBal

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

Fin I1 in the network infigure. ww 6 mA 20 mA 4 mA ww

Answered: 1 week ago