Homework
All homework is to be turned in via Eagle. Each homework assignment is worth 20 points (2% of your final grade).
- Homework 1
- Do Exercises 1 and 2 in the
Java tutorial. Also do
questions 1.8, 1.10, 1.21 (skip the Ada part), 3.2, and 3.4 in the
textbook. Due 14 Sep 2006.
See the Homework 1 Solutions.
- Homework 2
- Do 4.2, 4.5, 4.11(a & b), 4.22, 4.32 (use EBNF), and 4.40 in
the textbook. Due 28 Sep 2006.
See the Homework 2 Solutions.
- Homework 3
- Do 5.1, 5.6, 5.7, 5.8, 5.10, and 5.12 in the textbook. Due 12
Oct 2006.
See the Homework 3 Solutions.
- Homework 4
- Do 5.14, 5.24, 5.29, 5.32, 6.3, and 6.5 in the textbook. Due 26
Oct 2006.
See the Homework 4 Solutions.
- Homework 5
- Do 6.11, 6.16, 6.18, 6.28, and 6.51, and the following variations
on questions from the book. Due 16 Nov 2006.
- Variation on 6.31: Write a polymorphic
maxfunction in Haskell that takes a list of values of any type and returns the maximum value in the list. You will have to require that the actual type be of classOrdusing the(Ord a) => asyntax. - Variation on 6.38: A problem related to let-bound polymorphism
in Haskell is that of polymorphic recursion, where a
function calls itself recursively, but on different types at
different points in the code. For example, consider the
following Haskell function:
f x = if x == x then True else f False
What type does this function have? Is this the most general type it could have?
See the Homework 5 Solutions.
- Variation on 6.31: Write a polymorphic
- Homework 6
- Do 7.1 (you don't have to draw the syntax tree), 7.5, 7.10, 7.13,
7.18, 7.23, 7.36, and 7.49 in the textbook. Due 7 Dec 2006
See the Homework 6 Solutions.
Last modified: Wed Dec 13 14:54:08 MST 2006 by Jerry James