Question: Design, code and test classes necessary to represent a standard deck of 52 cards. The Card class is already provided. Deck class must have these
Design, code and test classes necessary to represent a standard deck of 52 cards. The Card class is already provided. Deck class must have these methods:
- public Deck() - Initially the standard 52 Cards (facedown)
- public int getCount() - how many Cards are currently in the Deck
- public void shuffle() - randomly shulffle the Cards currently in the Deck
- public Card deal() - remove a Card from the Deck and return it
- public String toString() - return a formatted string containing how many Cards are currently in the Deck
Your code will be manually assesed on each method and your use of the given Card class:
https://s3.amazonaws.com/mimirplatform.production/files/0ae487fd-baa6-4d23-9e9d-22218691668c/Card.java
Here is a sample test program for yoru Deck class. TestDeck.java:
https://s3.amazonaws.com/mimirplatform.production/files/7e264506-cbe2-47a1-b78f-04be368c3830/TestDeck.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
