Objectives Using enum types. To be able to build an application using arrays and enum types Overview The class PokerCard represents a common poker…

The PokerHand class is implemented using an array of 5 PokerCard elements.

Specific Requirements

The PokerCard class is already implemented. A client to test it is provided. Run the client and study the PokerCard code until you fully understand the implementation.

Complete the implementation of the PokerDeck class. A skeleton class with stubs of all the required methods is provided. Your implementation must

use the array representation described above,

use / and % to map an array index to CardSuit and CardRank ordinals,

use the ordinals to select from CardSuit.values() and CardRank.values() arrays.

A client to test your implementation is provided.

Complete the implementation of the PokerHand class. A skeleton class is provided.

Your addCard() method must insert the PokerCard being added to maintain the PokerHand in sorted order.

Your type() method’s algorithm must utilize the sorted order of a PokerHand.

Your type() method’s implementation must use a helper method(s) for each hand-type being tested.

 A client to test your implementation is provided.

Document your program

Include a Program Id Paragraph into both source files

Provide helpful comments

Leave a Reply