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

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!