CS 1323 Honors, Fall 1996
Team Project A
Due Monday, September 16, 4:29pm, FH303
What to Hand In
- 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 - first team member listed on roster
- recorder - second member on roster
- librarian - third member on roster
- collector - fourth member on roster
- It is important that you use the software each of you
developed for Individual Project 2 to complete the team
project. Do not redefine
those functions. (You may use those defined in the
solution to Project 2
on the CS1323 Honors Web site if any of those available to
you from your team member's work did not meet the
requirements of Project 2.)
- New operators you may use:
In addition to aspects of Haskell discussed in
Lessons 1-6 plus
Lesson 7 of the Haskell text
(yes, you may take advantage of the material
in Lesson 7 now) and those
permitted for Individual Project 2, you may use
- append (++)
- delivers a sequence built by concatenating its two arguments
"a's or an's |" ++ "***"
"a's or an's |***"
- delivers a sequence built by concatenating
the elements of its argument (which is a sequence
concat["Last","Train", "To", "Yuma"]
like unwords, but without inserting the spaces.
- concatenates all of the strings in its
argument (which is a sequence of strings) into one string,
with newline characters ('\n') between each of them
unlines["first line", "second line", "third line"]
"first line\nsecond line\nthird line"
like unwords, but with newline characters instead of
spaces as separators
When a string delivered by unlines is displayed, the
strings from the argument supplied to unlines appear
on separate lines on the screen.
you write for your
in which you execute the command "main".
This causes the Hugs system to produce the
value of the variable "main", defined in the
This leads to a display on the screen of the
string your function "displayDictionSignature"
delivers when it operates on the string made from
the sequence of characters in the file
of team meetings
Define a function called "displayDictionSignature"
that delivers a string depicting the number of occurances
of certain kinds of words
in the string supplied as its argument. Specifically,
the string should depict the number of occurances of
The string delivered by "displayDictionSignature"
will depict these numbers in the form of a bar chart.
Build the bar chart into the string as follows:
- the definite article ("the")
- indefinite articles ("a", "an")
- words with 4 letters or fewer
- words with 5 to 8 letters, inclusive
- words with 9 to 12 letters, inclusive
- more than 12 letters
- more than three i's in them
- Start each line in the string with a label indicating
which category the bar represents (e.g., "the's",
"a's or an's" etc.).
- Continue the line with vertical bar character ("|")
to indicate where the bar is to begin.
- Next, insert a sequence of n asterisks,
where n is the number of words in the category
represented by the line.
- terminate the line with a newline character ("\n")
- Repeat the same pattern for the next category
(this means the string delivered will contain several
newline characters, one at the end of the bar for each
category, so that when displayed the string will show
up as a bar chart with the bars running across the page
and the categories running down the page on separate lines).
- Be careful to make all the labels the same length (by
padding with blanks, for example), so that all of the
bars will start at the same distance from the left-hand
side of the page.
- You will need to use functions from Individual Project 2
in the definition of "displayDictionSignature".
If you have missing team members, or if some of their
functions from Individual Project 2 were incorrect,
you can use the functions defined in the
solution to Project 2
on the CS1323 Honors Web site, but you should
use the functions of your
own team members if possible, rather than these.
- Insert your definition of "displayDictionSignature"
and of the functions from Individual Project 2 into
a copy of the file
(The teamProjAFramework.lhs file indicates where your
definitions should go.)
- Express your definitions in the form of a
Haskell script." (See the
Project Style Guide).