Skat C Programming Skat Implement Object Oriented Simulation Card Game Skat Use Simulation Q43803843
Skat C++ Programming
Skat
You should implement an object-oriented simulation of the cardgame ‘Skat’ and use this simulation to investigate some statisticalquestions. (Note: You don’t need to know the game of skat to dothis. Everything you know this is the task.) Realize the classSkatGame and a supporting class
Card as described in the following class diagrams:
–>It is played with 32 cards, of which each of the threeplayers receives 10 cards. The remaining two cards remain face downon the table (‘Skat’). So the global constants for thearray sizes have the values DECK_SIZE =32, PLAYER_SIZE = 10 and SKAT_SIZE = 2.
–>A Card constructor is supposed to havethe two attributes suit and facewith values adopted from outside initialize for card color and cardvalue.
According to the rules of the Skat game, the enumeration types ohave the values { DIAMONDS = 0, HEARTS, Spades ,Diamonds} for the card color (enum suit), o have thevalues { SEVEN = 0, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE} forthe card value (enum face).
toString should return card color and cardvalue of the card separated by a space as a single string (e.g.”Seven of Diamonds” or “Queen of Hearts”).
The constructor of SkatGame should create all32 different cards of a Skat game (i.e. all 4 card colors(Suit) with all 8 card values(Face ) and save them in the attribute deck.
Note: You can use loops with suitableint-values and cast theint-values in Suit orFace when passing them to thecard constructor.
–> shuffle should mix the cards, i.e. putthe 32 card objects in the arraydeck in a random order.
–>deal should completely split the 32card objects in the array deckbetween the four arrays player1, player2, player3and skat. The first three arrays should contain 10of the card objects in deck and the remaining twocard objects in skat after calling deal. After allcards are distributed, the arrays player1, player2 andplayer3 are sorted ascending within deal as follows:
All CLUBS cards are higher than allSPADES cards, these are higher than all HEARTScards and these are higher than all DIAMONDScards. Within each suit the order is ACE, KING, QUEEN,JACK, TEN, NINE, EIGHT and SEVEN (ACE highest and SEVENlowest).
–>toString should return all card objects contained in thefour arrays player1, player2, player3 andskat in a suitable format as string. Here you haveto see how the 32 cards are distributed between the three playersand the Skat (the two remaining cards).
–>getSkat should return the arrayskat, which contains two card objects, so that itcan be used in the calling program.
Note ‘const-correctness’: All methods for whichthis is possible should be declared const. (Thisis not yet considered in the class diagrams!)

The application program (main) should performthe following activities:
–>Creation of a SkatGame object.
–>Execute the following sequence five times: shuffle, giveand deal the cards, which cards the three Players and theskat have received.
–>Mix and give the cards 10,000 times and determine howoften under the two cards of the Skat at least one BUBE isincluded. Enter the value obtained both as an absolute numericalvalue (e.g.:”In 10,000 games viewed, there is at least one jack inthe skat in 2379 games.”) As well as relative .Frequency inpercent. (Example: “23.79 percent of the skat blades contain atleast one jack in the skat.”)
–>Shuffle and give the cards 10,000 times and determine howoften both Skat BUBE cards are.Enter the value obtained both as an absolute numerical value and asa relative frequency in percent out.
SkatGame Card – deck: array<Card, DECK SIZE> – player1: array<Card, PLAYER SIZE> – player2: array<Card, PLAYER SIZE> – player3: array<Card, PLAYER SIZE> – skat: array<Card, SKAT_SIZE> – suit: Suit – face: Face + Card() + Card (Suit, Face) + getSuit(): Suit + getFace (): Face + toString(): string + SkatGame () + shuffle () : void + deal(): void + toString(): string + getskat(): array<Card, SKAT SIZE> Show transcribed image text SkatGame Card – deck: array – player1: array – player2: array – player3: array – skat: array – suit: Suit – face: Face + Card() + Card (Suit, Face) + getSuit(): Suit + getFace (): Face + toString(): string + SkatGame () + shuffle () : void + deal(): void + toString(): string + getskat(): array
Expert Answer
Answer to Skat C++ Programming Skat You should implement an object-oriented simulation of the card game ‘Skat’ and use this simula…
OR