FOURTH PROGRAMMING ASSIGNMENT
Write the major, intermediate, minor break program to read the data file described below and
produce a break program according to the specifications below. The break program will need to
print out information from a table that you have setup in memory. The input file you are reading
has the following layout:
Positions |
Contents of Field |
1 2 3 4 - 5 6 - 8 9 - 11 |
College Code Division Code Department Code Advisor Code
Number of Students Assigned to the Advisor Number of Students Actually Advised |
Actual Data:
11110025020
11111030025
11112050045
11227045040
11228020017
11229100900
11340035030
11341050038
11342010009
11425100087
11426025024
12114024020
12115025025
12116024024
12216020018
12217024017
12317025020
12318035034
12319089076
13110010009
13111025024
13112033032
13215120100
13217020018
13320025022
13321024022
13322050049
13424025023
13425025024
21112020018
21117030024
21133033032
21234020018
21245040035
21280030030
22110023022
22134032030
22220020020
22230020018
22223045042
22310010008
23101011010
23134034033
23220022021
23222020018
23224010010
This program should print a report on advises. Consider department code to be the minor break,
division code to be the intermediate break and college code to be the major break.
The detail line should print out the college name, the division name and the department name
(this information should be gotten from tables setup in Working Storage) as well as the advisor
code, the number of students assigned to the advisor, the number of students actually advised
and the number of students who were not advised (the result of a subtraction).
Each of the break lines should print the totals for number of students assigned to the advisor,
number of students actually advised and number of students not advised. Totals to be printed:
- minor totals by department
- intermediate totals by division
- major totals by college
- final totals
The college codes are as follows: 1 = BRISTOL, 2 = MASSASOIT
The division codes are as follows: 1 = DAY, 2 = DCE, 3 = CBI
The department codes are as follows: 1 = BUS, 2 = CIS, 3 = ETK, 4 = HLT
Notice, on the report the word BRISTOL is printed for code 1 this is because the college,
division and department names are gotten from tables that you will setup in memory and
code 1 in the college code stands for BRISTOL.
A sample report might start out looking like this depending on the input data and layout:
NOTE: This is only the beginning of the report - the report would print a final total line
on the last line
ADVISEMENT REPORT
COLLEGE DIV DEPT ADVISOR # ASGN #CAME # MISS
BRISTOL DAY BUS 10 25 20 5
BRISTOL DAY BUS 11 30 25 5
BRISTOL DAY BUS 12 50 45 5
TOTAL FOR BUS 105 90 15
BRISTOL DAY CIS 27 45 40 5
BRISTOL DAY CIS 28 20 17 3
BRISTOL DAY CIS 29 100 90 10
TOTAL FOR CIS 165 147 18
BRISTOL DAY ENV 40 35 30 5
BRISTOL DAY ENV 41 50 38 12
BRISTOL DAY ENV 42 10 9 1
TOTAL FOR ENV 95 77 18
BRISTOL DAY HLT 25 100 87 13
BRISTOL DAY HLT 26 25 24 1
TOTAL FOR HLT 125 111 14
TOTAL FOR DAY 490 425 65
BRISTOL DCE BUS 14 24 20 4
EXTRA CREDIT:
Notice on the report that the word BRISTOL appears over and over again as does the word DAY and
the department names. For extra credit this report should be group indicated - see the notes
for help in doing this.