CS 1323 Honors, Fall 1996
Team Project C
What to Hand In
Catalog Sales Report
Due Wednesday, October 23, 4:30pm, FH303
Program Organization Chart
exhibiting the interactions between major program
components. Attach a report to the chart
providing a rationale for the program organization.
(Why does it organize the parts of the computation
in a coherent way? How does it facilitate independent
work on different parts of the program by different
your team writes for this project
in which you issue the command main.
This causes the Hugs system to carry out the
sequence of requests to the operating system
specified in the definition of the variable "main", defined in
Main module for the project.
This leads to the display of a report
created from data in a file called
to be supplied through
the CS1323h Web site at noon on the project due date.
The usual requirement for annotating
the session transcript is waived for this project.
You will, of course, have
convinced yourself well before noon on the due date
that your program will handle any
correctly. This process may have
included testing (a file,
available on the CS1323h Web site
contains some test data - you may want to add
be based to an even greater extent on reviewing your
program and the problem requirements to make sure all
bases are covered.
of team meetings
Construct a Haskell program that displays a catalog sales
report based on data contained in a file. The program should
ask the person at the keyboard to enter the name of the
file containing the sales data, then display the report on
- Catalog Sales Data File
The sales data file will contain a sequence of customer orders.
The data record for each customer order
will begin with a line containing the
customer's name, then a line with the street address, a
line with the city, state, and zipcode (this line will meet
the specifications of
Individual Project 5A),
a line with the date (a la
Individual Project 5C),
and then a sequence of lines containing item entries
Individual Project 5B).
Note that the customer may order many items, and all
of these items will be listed on separate lines
within the data record for that customer.
The last item in the sequence will be followed by
an empty line,
which completes the data record for the customer order.
Exception: It may happen that the data record for the
last customer order in the file is not followed by an
empty line. That is, there definitely will be
an empty line between the data record for the first
customer order and the record for the second,
between the second and the
third, and so on, but there may or may not be an empty line
after the data record for the last customer order.
- Catalog Sales Report
The sales report will have two sections, one listing the customer
orders by zipcode (small zipcodes preceding large ones)
and another listing them by date
(earlier dates preceding later ones).
The by-zipcode section of
the report will list all customer orders, including
name, address, date, and items, and it will also include,
along with each customer's record in the report, the
total dollar-value of the items that customer ordered.
The dollar value must be displayed prominently,
at the bottom of the customer's record in the report,
with a dollar sign and two decimal
digits, as dollar amounts are customarily displayed.
Customer orders will be separated from each other
in the report by blank lines.
The by-date report section of the report
will list only customer name, address, and
Date lines, city/state lines of addresses, and item lines in
reports must be displayed in standard form, as described in
Individual Project 5).
- The program must be organized as a collection of modules.
Your team is responsible for designing the modular
organization. The organization should provide a coherent
logical context that communicates the structure of the
computation, and it should facilitate independent work
on parts of the program by different people.
- Any module may import the
modules to get access to functions exportd from those modules.
Previous team projects have required assembling components
produced in individual projects, but have required very little
in the way of designing an overall organization for the program
or in designing and constructing new components. This team
project requires all three elements:
design of program organization,
design and construction of
new components, and
assembly of existing and new components.
- In each team project, certain team members will
These assignments will rotate
with each successive project. For this project,
the assignments are
Team Organization document
outlines the duties associated with these assignments
- leader - third team member listed on roster
- recorder - fourth member on roster
- librarian - first member on roster (fifth for Team Reid)
- collector - second member on roster (first for Team Reid)
- Use the software each of you
developed for Individual Project 5 to complete the team
project. Do not redefine those functions.
You may use those defined in the
solution to Project 5
on the CS1323 Honors Web site if any of those available to
you from the work of your team members did not meet the
requirements of Project 5.
- You may use any aspects of Haskell except recursion.
- Use the function
module to arrange records in the
proper order for the reports.
- As usual, follow the standards required in the
Project Style Guide
(except that annotations on the session
transcript explaining your choice of
demonstration examples is not required in this project).