APCS: Elevens Project, Activity 2

3 points 

Activity 2 is "Initial Design of a Deck Class."
Download the files Deck.java and DeckTester.java below.
In the Student Guide, read pages 7 - 8 and carry out the coding instructions in Exercises 1 & 2.
Note that, in the Deck constructor, the arrays 'ranks' and 'values' have to "line up". For example, from a standard deck of cards, if 'ranks' read {"Nine", "Ten", "Jack", "Queen"} then 'values' would have to read {9, 10, 10, 10}.
For the deal method, be sure to implement Algorithm 2.
Exercise 2 asks you to create 3 Decks and test them, but you only have to create 1 Deck and test it.


Resources:
Student Guide
Deck.java
DeckTester.java

 

Links:
Elevens Project
AP Computer Science