Question: Java - Calling Method The highlighted in a subsection is duplicate code, yellow means determining the interest rate, and red means calculating future balance, fuchsia

Java - Calling Method

The highlighted in a subsection is duplicate code, yellow means determining the interest rate, and red means calculating future balance, fuchsia = our formatted output, let's turn each of these into a module and then refer to the updated flowcharts.

Java - Calling Method The highlighted in a subsection is duplicate code,all the below is in our main() method, where within main() we make a call to methods getInterestRate() and displayAccounts()

yellow means determining the interest rate, and red means calculating future balance,fuchsia = our formatted output, let's turn each of these into a

module and then refer to the updated flowcharts. all the below is

in our main() method, where within main() we make a call to

When Defining your methods the method headers (signatures) should be as follows - you will code the logic within each module:

public static double getInterestRate(double deposit)

public static double calcFutureBalance(double deposit, double interest)

public static void displayAccounts(String name, int ckAccount, double ckdeposit, int svAccount, double svdeposit, double interestRate).

**hint: CALL the calcFutureBalance() module FROM displayAccounts() ****

A Yes name = "STOP" NO "Enter accounttype (Checking or Savings)" GET acct Type ...... acctType = "Checking" Yes No "If opening a checking account, you are required to open a Savings account with minimum $100.00 depost Cofinue?" GET continue ckAcct - 0 Yes No continue yes ckDeposit - 0 "Enter Deposit for Savings" GET say Deposit "Enter Deposit for Savings" GET sav Deposit savAcct random SavAcct random Yes No B Yes sav Deposit 100 No sav Deposit 100 ........... Yes No Yes NO PUT "no accounts opened initial depostrequirements not met PUT "no accounts opened initial depost requirements not met sav Deposit 500 sav Deposit = 500 YOS No savDeposit 1000 Yes No interestRate-035 interest Rate .035 savDeposit 1000 V. interest Rate .045 interestRate .045 interestRate .045 interestRate .045 future Balance sav Deposit * (1 + interestRate) 12_ "Enter Deposit for Checking" futureBalance sav Deposit + (1 - interestRate) 12 HOT POT FORMATTED DATAAS DECRIBED IN LABS GET ckDeposit ckAcct random PUT "OUTPUT FORMATTED DATAAS DECRIBED IN LABT Start Enter customer name: GET name Loop B Yes name = "STOP" No "Enter accounttype (Checking or Savings)" GET acetType Yes NO acctType = "Checking" V ckAceto "If opening a checking account, you are required to open a Savings account with minimum $100.00 depost Cotinue?" GET continue * B Yes continue = No ves ckDeposit - 0 "Enter Deposit for Savings GET sav Deposit "Enter Deposit for Savings GET savDeposit savAcct random savAcct random getInterestRate getInterestRate B Yes interestRate = 0 B Yes No interest Rate = No PUT no accounts opened initial depostrequirements PUT no accounts opened initial depostrequirements not met display Accounts ckAcct random not mets "Enter Deposit for Checking" GET ckDeposit display Accounts PUT "Program has ended End getinterestRate calcFuture Balance displayAccounts Start Yes No sav Deposit = 100 Yes No interestRate - 0 sav Deposit = 500 interestRate .035 sav Deposit = 1000 interestRate .045 interestRate -.045 End main getinterestRate calcFutureBalance display Accounts Start futureBalance sav Deposit * - interestRate) 12 End main getinterestRate calcFutureBalance displayAccounts Start calcFuture Balance PUT "Output fomstad information for custom Accounts End A Yes name = "STOP" NO "Enter accounttype (Checking or Savings)" GET acct Type ...... acctType = "Checking" Yes No "If opening a checking account, you are required to open a Savings account with minimum $100.00 depost Cofinue?" GET continue ckAcct - 0 Yes No continue yes ckDeposit - 0 "Enter Deposit for Savings" GET say Deposit "Enter Deposit for Savings" GET sav Deposit savAcct random SavAcct random Yes No B Yes sav Deposit 100 No sav Deposit 100 ........... Yes No Yes NO PUT "no accounts opened initial depostrequirements not met PUT "no accounts opened initial depost requirements not met sav Deposit 500 sav Deposit = 500 YOS No savDeposit 1000 Yes No interestRate-035 interest Rate .035 savDeposit 1000 V. interest Rate .045 interestRate .045 interestRate .045 interestRate .045 future Balance sav Deposit * (1 + interestRate) 12_ "Enter Deposit for Checking" futureBalance sav Deposit + (1 - interestRate) 12 HOT POT FORMATTED DATAAS DECRIBED IN LABS GET ckDeposit ckAcct random PUT "OUTPUT FORMATTED DATAAS DECRIBED IN LABT Start Enter customer name: GET name Loop B Yes name = "STOP" No "Enter accounttype (Checking or Savings)" GET acetType Yes NO acctType = "Checking" V ckAceto "If opening a checking account, you are required to open a Savings account with minimum $100.00 depost Cotinue?" GET continue * B Yes continue = No ves ckDeposit - 0 "Enter Deposit for Savings GET sav Deposit "Enter Deposit for Savings GET savDeposit savAcct random savAcct random getInterestRate getInterestRate B Yes interestRate = 0 B Yes No interest Rate = No PUT no accounts opened initial depostrequirements PUT no accounts opened initial depostrequirements not met display Accounts ckAcct random not mets "Enter Deposit for Checking" GET ckDeposit display Accounts PUT "Program has ended End getinterestRate calcFuture Balance displayAccounts Start Yes No sav Deposit = 100 Yes No interestRate - 0 sav Deposit = 500 interestRate .035 sav Deposit = 1000 interestRate .045 interestRate -.045 End main getinterestRate calcFutureBalance display Accounts Start futureBalance sav Deposit * - interestRate) 12 End main getinterestRate calcFutureBalance displayAccounts Start calcFuture Balance PUT "Output fomstad information for custom Accounts End

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!