COSC 1337 - Programming Fundamentals II
Bob Comer, Professor of Computer Studies


Assignment 3 - Checkbook Balancing Revisited

Read through Chapter 6 in your textbook before starting this assignment.

Modify your checkbook balancing program from assignment 2 as follows:

The program commands are as follows (see the sample program dialog near the bottom of this page).

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 dialog 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 Programming Fundamentals II Home Page

Copyright: ©2013 by the Austin Community College
Department of Computer Studies. All rights reserved.
Comments to:
Bob Comer
Last updated: January 1, 2013