Question: Functional Requirements Each class interface and implementation must be in its own file. Your program must meet the requirements defined below: The program has a
Functional Requirements
Each class interface and implementation must be in its own file.
Your program must meet the requirements defined below:
The program has a deck of cards that the dealer controls
Five players not including the dealer
The game must shuffle the deck of cards when the program starts and between each game
After each game the option is offered to play again or quit
At the start of each game each player, including the dealer, gets two cards.
Each player is asked if they want a card.
If the player wants another card:
The card is moved from the top of the card deck into the players hand
If the players hand is below :
The player returns to if player wants another card
If the players hand is or above the dealer moves to the next player
If the player does not want another card the dealer moves to the next player
After all five players have their hands the dealer will take the next card from the top of the deck until:
The dealer has five cards in their hand that total or less
The dealer has or greater
After the dealer gets their hand each player is evaluated for win loose or draw
A player wins if:
They have more points than the dealer without going over
The dealer goes over any player that has or less wins
A player draws if:
They have equal points as the dealer and has or less
If both the player and dealer have more than
A player looses:
If the dealer has five cards with a total of or less
If they go over and the dealer has or less
If the player has less than the dealer and both are below
Design Requirements
Struct card
String suit
String Face
Decimal value
Class CardDeck
Has a one to many with type card
total cards
Suites: Diamonds, hearts, clubs and spades
Face: Each suite will have cards jack, queen, king and ace
Value: The value of each card will be the same as the face with jack, queen, and king having a value of and each ace can have a value of or
Class Player
String Name
Array Hand can hold up to ten cards
Boolean Canhit This value is true until the value in PlayerCards for this player goes above
Decimal HandValue totals the value of the cards in this player hand
Class Dealer is a player
This is the only player that can access CardDeck eg has functions to deal and shuffle deck
The Boolean Canhit for dealer goes false if they have five cards with a total less than or or above
Class Table
Has a one to many with Players
Has a Card Deck
Has a Dealer
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
