Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

In Java image text in transcribed
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

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

More Books

Students also viewed these Databases questions

Question

What are collectibles?

Answered: 1 week ago

Question

Describe the risks of and barriers to hosting events. LO1

Answered: 1 week ago