Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

c++ When you finish the code, please also mark and describe which is part 1 and

ID: 3682953 • Letter: C

Question

c++ When you finish the code, please also mark and describe which is part 1 and part 2 . thanks.

Workout 1) Playing Card Class In this problem, you will implement a DeckOfCards class that simulates a deck of playing cards. The class will utilize an important algorithm to "shuffle" the simulated card deck. Part 1: Create an object class named DeckOfCards that models a randomized deck of playing cards. Individual "cards" will be represented by integer values as follows: 0 1 23 4 5 6 7 8 9 10 11 12 13 14 15 16 .. 51 A 2 3 4 5 6 789 10 J QK A 2 3 4 .. K Where the value 0 represents the Ace of the "first" suit, 1 is the 2 of the first suit, 13 is the Ace of the "second" suit, and so on. The actual "suit" of the card will not be needed for now and can be ignored. Also note that in this problem we start counting with 0, rather than with 1 The DeckOfCards class should include the following private data members A 52 element integer array to represent the shuffled deck of cards .An integer index to maintain the "next card" to be dealt from the deck The DeckOfCards class must also provide the following public (member) functions: .A default constructor that will initialize the values of the card deck array with integer values .A member function dealCard () that will return the "next" card value from the shuffled A member function shuffle () that takes no arguments and "shuffles" (randomizes) the 0...51, and then "shuffle" the card deck (see description below) deck. If no cards remain, then the deck should be reshuffled (and reset) values in the card "deck" using the Knuth Shuffle algorithm. Given an array a with n elements, the Knuth Shuffle algorithm is as follows FOR i = n-1 TO 1 REPEAT the following two lines: j = a pseudo-random integer from the interval 0

Explanation / Answer

};

}

#include <iostream>
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote