CSCE 145: Lab 22
Checkbook

Objectives

In this week's lab you will learn about:

Program

Do problem 8.10 parts b and c on page 458 in your text.

In your main method instead of hard-coding sample data, create a menu to interact with the user as shown in the example below.

Example Output

Welcome to your checkbook.

Enter 'a' to add a check, 'v' to view one, or 'q' to quit:

a

Enter the check number:

300

Enter the name on the check:

Joe Smith

Enter the amount of the check:

340.22

Enter a memo for the check:

repayment

Added check number 300.

Enter 'a' to add a check, 'v' to view one, or 'q' to quit:

a

Enter the check number:

301

Enter the name on the check:

Sally Smith

Enter the amount of the check:

23.22

Enter a memo for the check:

thank you

Added check number 301.

Enter 'a' to add a check, 'v' to view one, or 'q' to quit:

v

Which check number would you like to view?

300

Printing check 300:

To: Joe Smith

Amount: $340.22

Memo: repayment

Enter 'a' to add a check, 'v' to view one, or 'q' to quit:

q

Thank you for using this checkbook. Goodbye.

Files needed for this lab: