Question
Factory Pattern Our Deck from the Blackjack Game is an interesting Class. We produce one Deck and add it to the DealPile in our implementation.
Factory Pattern
Our Deck from the Blackjack Game is an interesting Class. We produce one Deck and add it to the DealPile in our implementation. However, it is easy to see that there may be call to change this for different situations. For more players, or to prevent "card counting," it might be useful to have a way to create a Deck with 5 of each card for the DealPile For a different game (e.g., Pinochle), it may be helpful to generate a Deck with a subset of the cards.
The Cards in the Deck all behave the same, but the generation of the Deck object itself may have a number of variations, as described above.
All hands on DeckDiagram (in a Class Diagram) the set of classes and methods needed to implement a Factory Pattern for creating
Standard, 52-card decks
Jumbo, 260 card Decks (containing the same cards as 5 52-card Standard decks)
Pinochle, a 48-card deck consisting of 2 copies of each standard card 9, 10, J, Q, K, A in each suit.
Notes
Your diagram should show inheritance/subclassing as appropriate, and all public methods should be shown.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started