Next: Shuffling and sorting
Up: Assignment 12: Arrays of
Previous: Assignment 12: Arrays of
In Chapter 12 there are several methods that I sketch
but don't fill in completely.
You should type them in and clean them up:
- 1.
- Modify printCard so that it uses an array
of Strings instead of a chained conditional.
- 2.
- Type in sameCard and test it. Make sure
you are clear on the difference between shallow and deep
equality.
- 3.
- Use the code in Section 12.6 to write a method called
buildDeck that creates and returns a fully-populated array
of cards.
- 4.
- Write a method called printDeck that takes
an array of cards and prints them one per line.
- 5.
- Type in and test findCard.
Allen B. Downey
1999-04-28