COSC
117
Programming Assignment #2
DESCRIPTION: Produce a summary of
check activity for a month. It
should print the check number and the amount for each check given by the user
from the keyboard. It will also
show any checks missing in the sequence by producing dashes as the amount.
It will print out the total number of checks, the total amount of all the
checks, the total number of large checks (checks over $500.00 which will be
flagged for reference) written, the total of low checks( checks under $1.50
which are also flagged to encourage such customers to use debit cards) as well
as the average of all checks and the average of the normal (those not large or
small) checks.
Clarification: You can assume that
the user will input the checks in ascending order although there may be missing
checks in the sequence.
Please
input a check number and a negative number to quit
114
Check
Amount
_____
_________
Enter the amount of the check895.45
114
$895.45
Please input a check number and a negative number to quit117
115
------------
116
------------
Enter the amount of the check76.90
117
$76.90
Please input a check number and a negative number to quit118
Enter the amount of the check45.67
118
$45.67
Please input a check number and a negative number to quit122
119
------------
120
------------
121
------------
Enter the amount of the check1.25
122
$1.25
Please input a check number and a negative number to quit124
123
------------
Enter the amount of the check578.56
124
$578.56
Please input a check number and a negative number to quit125
Enter the amount of the check90.45
125
$90.45
Please input a check number and a negative number to quit-4
The total
number of checks was 6
The total
amount of all the checks was $1688.28
The number
of large checks over $500 is 2
The number
of small checks under $1.50 is 1
The average
of normal checks is $71.01
The average of all checks is 281.38
Part 1
You must develop an Algorithm that includes the following
A. First section-- Sample Input/Output. The specs give you one sample run. You should include at least one more
B. Variable list--Input variables, output variables, other Variables
C. A tree structure (This is the only section that does not have to use a computer
D. The algorithm coming from the tree structure (the pseudo-code)
Part 2
A. Heading comments
Programmers name
Assignment number
Class and Section
Date
Description of the program
B. You must use at least 3 methods: main a void method that requires no arguments and a void method that requires arguments