Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

Find the area bounded by the curve x = t 1/t, y = t + 1/t 2.5.

Answered: 1 week ago