Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this. I am new to it and get started and then become completely unsure of where to go. The program should

I need help with this. I am new to it and get started and then become completely unsure of where to go.

The program should have the user enter the initial balance followed by a series of transactions. For each transaction, first have the user enter a transaction type. The valid transaction types are:

C - process a check.

D - process a deposit.

E - perform end-of-month processing and exit the program.

For checks and deposits, the user should be prompted to enter the transaction amount.

Service Charges

-There is a $0.25 service charge for each check written. Keep a running total of the service charges.

-Service charges are not deducted from the account balance until the end of the month.

Output

After each transaction, print

-the command data (to confirm the transaction)

-the resulting account balance

-the total service charges accrued so far

At the end of the month, deduct the service charges and print the final balance. Your program output should look something like this example (user input is shown in bold).

Input validation

If the transaction type is invalid, print an informative error message.

-Ignore the current transaction and have the user enter the next transaction.

-The transaction amount should be a positive number (larger than zero). If it is not, print an informative error message. Ignore the current transaction and have the user enter the next transaction.

Other requirements

-Do not use global variables.

-All dollar amounts should be printed in 2 decimal places.

SAMPLE RUN (User entry is in BOLD ITALICS)

Users Entry

Checkbook Balancing Program

Enter the beginning balance: 900

Select Transaction Type:

C - Process a check

D - Process a deposit

E - Exit

Enter transaction type: C

Enter transaction amount: 50.25

Processing check for $50.25

Processed

Balance: $849.75

Service charge: $.25 for a check

Total service charges: $.25

----------------------------------------------------------------------------

Select Transaction Type:

C - Process a check

D - Process a deposit

E Exit

Enter transaction type: C

Enter transaction amount: 250

Processing check for $250.00

Processed Balance: $599.75

Service charge: $0.25 for a check

Total service charges: $.50

----------------------------------------------------------------------------

Select Transaction Type:

C - Process a check

D - Process a deposit

E Exit

Enter transaction type: D

Enter transaction amount: 200

Processing deposit for $200.00

Processed Balance: $799.75

Total service charges: $.50

----------------------------------------------------------------------------

Select Transaction Type:

C - Process a check

D - Process a deposit

E Exit

Processed

Enter transaction type: E

Processing end of month Final balance: $799.25

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions