Question
JAVA. Write a program that calculates the current checking account balance, based on user input. Use loop and files. ++ and -- are operators that
JAVA. Write a program that calculates the current checking account balance, based on user input.
Use loop and files. ++ and -- are operators that add and subtract one from their operands
Inputs:
Ask user for account number and name.
Ask user for opening balance.
Ask user for up to 5 withdrawal transactions, user can stop entering by typing -1.
Ask user for up to 5 deposit transactions, user can stop entering by typing -1.
Processing:
Calculate new balance.
Output:
[Account number] - [Customer first name] [Customer last name]
Original Balance: [Original balance]
Withdrawals: [Number of withdrawals]
Withdrawal Total: [Withdrawal total]
Deposits: [Number of deposits]
Deposit Total: [Deposit total]
Balance: [Current account balance]
Sample output:
123456789 - Robert Robertson
Original Balance: $100.00
Withdrawals: 5
Withdrawal Total: $10.00
Deposits: 5
Deposit Total: $20.00
Balance: $110.00
Step 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