Question: //Activity 5 import cards.*; import hands.*; public class Activity5 { public static void main(String[] args) { Deck d = new Deck(52); HandOfCards hand = new

| //Activity 5 import cards.*; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import hands.*; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public class Activity5 { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public static void main(String[] args) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Deck d = new Deck(52); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HandOfCards hand = new HandOfTwo(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hand.addCard(d.dealOne()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hand.addCard(d.dealOne()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| System.out.println("Hand :"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hand.printHand(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Recall that the source code has two implementations of a HandOfCards. Add a new hand of cards class called LinkedListHand that uses the linked list class we made in class (not the implementation from the book or the Java API) as the underlying data structure. Your new class should be part of the hands package. In your driver, create a new hand of cards using the linked list hand of cards class and display its contents
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
