Question: In Java Write a program to simulate a bank transaction accounts, reject negative balances. Then ask for the account, options are checking and savings. Then
Write a program to simulate a bank transaction accounts, reject negative balances. Then ask for the account, options are checking and savings. Then ask for the transactions, options are deposit, withdrawal, and transfer. Then ask for the amount, reject transactions that overdraw an account. At the end, print the balances of both accounts There are two bank accounts checking and savings. First, ask for the inital balances of the bank NOTE: Your implementation must include the definition/implementation and use/calling of the following methods o getBalance method is passed the account name (String) to its parameter variable it prompts (eg, Enter the saving account balance an gets the floating-point account balance as user input. Finally, it returns the user-input balance o getTransaction method is passed the account name (String) to its parameter variable. It prompts (e g. "Enter the saving account transaction transfer and gets the transaction String as user input. Finally it returns the user input as an int 1 for "deposit", 2 for 'withdrawal", 3 for o getAmount mothod is passed the account name (String) and the transaction (String) to its parameter variables It prompts (o g. Enter the withdrawal amount for the checking account 0 and gets the floating-point transaction amount as user input. Finally it returns the user-input transaction amount sho Balance method is passed the account name (String) and the floating port account balance to its parameter vanables It outputs the account name as balance (eg, "The checking account balance $1,23456)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
