Indiana University of Pennsylvania
Computer Science Department
Wolfe and Maple
CO 110 Spring 85
Programming Project #4
For project four, you are to write a program that produces a
simple report regarding the production of gizmos for a small
company, Widget Inc. In an experiment to improve overall
efficiency, the workers at Widget who make gizmos have been
divided into production teams. Some teams have been working
together for up to six weeks, other teams for as little as one
week. The report that your program produces shows some basic
statistics about gizmo production and a rating for the teams.
The data for the program is kept in a file. The first data
record contains only the number of teams. This is followed by
one data record for each team. Each team record has the
following data items: team name, followed by the number of weeks
the team has worked together, followed by the numbers of gizmos
produced by the team for the weeks of working. Below is a set of
sample data.
6
'STING' 3 470 609 614
'WIZARDS' 1 484
'FLASH' 2 349 478
'WHALERS' 5 199 339 460 457 582
'MISFITS' 3 421 443 479
'LAST CHANCE' 2 364 590
From data such as this, your program must produce a report
on gizmo production and a listing of the teams by category.
GIZMO PRODUCTION
TOTALS (IN HUNDREDS)
111111111122222222223
TEAM #WEEKS TEAM AVG 0123456789012345678901234567890
STING 3 564.3 :*****************
WIZARDS 1 484.0 :*****
FLASH 2 413.5 :********
WHALERS 5 407.4 :********************
MISFITS 3 447.7 :*************
LAST CHANCE 2 477.0 :**********
OVERALL AVERAGE FOR 16 WEEKS 458.63
TEAM RATINGS
SUPERIOR TEAMS
STING
ADEQUATE TEAMS
WIZARDS FLASH MISFITS
LAST CHANCE
UNSATISFACTORY TEAMS
WHALERS
The production report shows the name of each team, the
number of weeks the team has worked, the team's average
production for that time, and a histogram representing the team's
total production (in hundreds of gizmos). The total production
is rounded to the nearest hundred to determine the number of
asterisks in the histogram.
The listing of the teams by category must show the names of
the teams in each category with up to three names on a line. For
example, if there were eight names in a category, they would be
listed in the following form:
xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxx xxxxxxxxxxxx
There are three categories: SUPERIOR for teams whose average is
more than 50 units greater than the overall average;
UNSATISFACTORY for teams whose average is more than 50 units less
than the overall average; and ADEQUATE for teams whose average is
between these two limits.
The actual data for program four is contained in a file
called 110DATA4.COMPSCI which your program can read by having the
following statement as the first executable statement.
OPEN (105, FILE='110DATA4.COMPSCI')
You must hand in a batch listing of your program with the
output. In order to get this batch listing, you must build a
file containing IBEX commands. Such a file is called a JCL file
and should contain the following commands, with the exclamation
point in column 1. Note: these commands assume your FORTRAN
program is in a file called PROG-4.
!JOB SCAN
!FORTRAN PROG-4(LS,ANS)
!RUN
Assume that you call your JCL file JCL-4. Then, to get the batch
listing and the output, you must give the following command at
your terminal.
BATCH JCL-4
While developing your program, you can cause the commands in your
JCL file to be executed with the listing and output sent to your
terminal. You do this by giving the following command at your
terminal.
XEQ JCL-4
Program Requirements
1. All output must done using formatted PRINT statements.
2. Team averages must have 1 fractional digit; the overall
average must have 2 fractional digits.
3. The production report must begin at the top of a page.
4. Titles in the output (as in the sample report) must be as
shown; however, spacing both horizontally and vertically may
vary.
5. Team names listed in the three categories must be listed
three across the page (as in the example). Only if there
aren't three team names left can the line have fewer than
three names.
6. You must use arrays and implied DO loops to perform some of
the tasks in this program. Actually, some tasks cannot be
performed in any other way.
7. Your program must handle up to 40 teams. However, your
program should be written in such a way that the number of
teams can easily be changed.
8. The production team names may contain up to twelve
characters.
9. No more than 30 asterisks should be printed in the histogram
for any team, even if the team's total production is more
than 3049 gizmos.
10. Documentation requirements are the usual: identification,
program description, and data table. No flowchart is
required.