Intermediate Total Exercise:
Positions |
Type |
Field Name |
Field Description |
1-2 |
Char/text |
BR |
Branch Number |
3-4 |
Char/text |
DEPT |
Department Number |
5-9 |
Char/text |
ITEMNO |
Item Number |
10-30 |
Char/text |
ITEMNAME |
Item Name |
31-33 |
Number |
ONHAND |
On Hand |
34-102 |
|
|
Other information we are not dealing with in this example |
I am only going to show the data in the records on the file for the four fields we are using in this problem:
BR |
DEPT |
ITEMNO |
ITEMNAME |
ONHAND |
01 |
10 |
11111 |
Hammer |
20 |
01 |
10 |
12345 |
Hand Saw |
37 |
01 |
10 |
13456 |
Screw Driver |
42 |
01 |
10 |
14567 |
Pliers |
13 |
01 |
20 |
15678 |
Hoe |
07 |
01 |
20 |
16789 |
Rake |
19 |
01 |
20 |
17890 |
Trowel |
03 |
02 |
30 |
20000 |
Hose |
19 |
02 |
30 |
20001 |
Sprinkler |
23 |
02 |
40 |
21000 |
Rhododendron |
17 |
02 |
40 |
21001 |
Lilac |
10 |
02 |
40 |
21002 |
Laurel |
02 |
I want to print a report that will break on branch and department. Notice that the departments are within branches. For example, the 01 branch might be Fall River with two departments (10 and 20) and the 02 branch might be New Bedford with two departments (30 and 40).
I want the report to show department totals, branch totals and final totals.
Your assignment is to either draw the logic flowchart or write the pseudocode to solve this problem. Note that I want the entire program covered. You should deal with Housekeeping, Processing and Wrapup as well as the detail routines to print the data from the records and the total routines to print the total lines.