CIS 2003 - Introduction to C++ and C Programming
Bob Comer, Professor, CIS/CSC


Assignment 3 - Checkbook Balancing

Write a C++ program to help you balance your checkbook at the end of the month. The program should have the user enter the initial balance followed by a series of transactions.

Transaction command

Meaning

C amount

Process a check for amount dollars, where amount is a floating-point number.

D amount

Process a deposit for amount dollars, where amount is a floating-point number.

E

End the program.

Service Charges

Output

For each transaction, print

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).

Enter the beginning balance: 900

Enter a transaction: C 50.25
Processing check for $50.25
Balance: $849.75
Service charge: $0.25 for a check
Total service charges: $.25

Enter a transaction: C 250
Processing check for $250.00
Balance: $599.75
Service charge: $0.25 for a check
Service charge: $5.00 balance below $800.00
Total service charges: $5.50

Enter a transaction: D 200
Processing deposit for $200.00
Balance: $799.75
Total service charges: $5.50

Enter a transaction: E
Processing end of month
Final balance: $794.25

 

Other requirements


Return to C++ Home Page

Copyright: Ó2000 by the Austin Community College
Department of Computer Studies. All rights reserved.
Comments to:
Bob Comer
Last updated: February 9, 2000