Homework Assignments
Unless otherwise stated, the
homework is due in the following week on Thursday
after the assignment is posted. You should either hand in your homework in
class or email your homework using the submit facility by 11:15am. For programming assignments you must use the
submit facility.
FAQ: How to submit programming
assignments and projects?
HW1 (posted 9/9/04)
- 2.2.10
(i.e., Problem 10 in Section 2.2)
- 2.3.2
(programming)
- 2.4.5
- 2.5.36
(programming)
HW2 (posted 9/16/04)
- 2.6.16
- 2.7.4
- 2.8.6
- Programming
Exercise 2.7
- 3.1.6
- 3.2.2
- 3.3.3
- 3.4.2
- Programming
Exercise 3.2
HW3 (posted 9/20/04)
- All
problems in Section 3.5 whose problem number is divisible by 4
- 3.6.2
- 3.7.4
- 3.8.2
- Programming
Exercise 3.6
Additional information:
§
Implement your class that represents an ordinary
52-card deck with four suits (hearts, clubs, diamonds, and spades) and 13 cards
per suit: ace, king, queen, jack, 10, …, 2. Represent
the deck in any convenient way.
§
The built-in random number generator rand has
the following prototype:
#include <cstdlib>
int rand();
It returns a pseudorandom integer
in the range 0 to RAND_MAX (a constant defined in cstdlib).
HW4 (posted 9/30/04)
- 4.2.2
- 4.4.2,
4.4.6
- All
problems in Section 4.5 with even numbers
- 4.7.2,
4.7.4
- Programming
Exercise 4.2
- Programming
Exercise 4.5
Additional
information: Use Programming Exercise 3.6 as a base class
HW5 (posted 10/7/04)
- In
Section 5.1: 2, 6, 8, 10, 14, 16
- 5.2.2
- In
Section 5.3: 2, 4, 6, 8, 10, 12
HW6 (posted 10/12/04)
- 5.4:
2, 4, 6, 8
- 5.5:
2, 4, 6, 8, 10, 12, 14
- Programming
Exercise 5.4
HW7 (posted 10/28/04)
- 6.1.6
- 6.2.4
- 6.3.6
- 6.4.6
- 6.5.4
- 6.6.4
- 6.7:
4, 8, 12
- Programming
Exercises: 6.2, 6.9
HW8 (posted 11/04/08)
- 6.8.2
- 6.9:
2, 4, 6
- 7.1:
2, 4, 6, 8, 10
- Programming
Exercise: 7.4
- 8.2:
2, 4, 8, 14
HW9 (posted 11/09/04)
- 8.2.16
- 8.3:
all even numbered problems. Note:
For those problems where you’re asked to write a code segment, write a
complete program instead.
HW10 (Due 11/30/04 11:30am)
- 8.4:
2, 4, 6, 8, 10
- 8.5:
2, 4, 6
HW11 (Due 12/02/04
11:30am)
- 8.8.2
- 8.9.2
HW12 (Due 12/14/04 11:30am)
- 7.3:
All even numbered problems