Question: [C++ Coding Question about Card Deck] 1) Program a Card class with these member variables: number an integer between 1 and 13 suit an enumerated

[C++ Coding Question about Card Deck]

1) Program a Card class with these member variables:

number an integer between 1 and 13

suit an enumerated data type with values { Spade, Heart, Diamond, Club }

description a string with card name for example Spade Ace or Heart 5

A card object with number 1 is an Ace. Number 11 represents a Jack, 12 represents a Queen, and 13 represents a King.

Your class should have set and get member functions to update and return the value of each member variable.

2) Write a main program which creates and displays a deck of 52 cards. The display should look something like this:

[C++ Coding Question about Card Deck] 1) Program a Card class with

3) Separate your class definition and main program from part 2 into two files. Ensure you can build and run your program.

Heart Spade Ace Spade 2 Spade 3 Spade 4 Spade 5 Spade 6 Spade 7 Spade 8 Spade 9 Spade 10 Spade Jack Spade Queen Spade King Diamond Ace Diamond 2 Diamond 3 Diamond 4 Diamond 5 Diamond 6 Diamond 7 Diamond 8 Diamond 9 Diamond 10 Diamond Jack Diamond Queen Diamond King Club Ace Club 2 Club 3 Club 4 Club 5 Club 6 Club 7 Club 8 Club 9 Club 10 Club Jack Club Queen Club King Ace Heart 2 Heart 3 Heart 4 Heart 5 Heart 6 Heart 7 Heart 8 Heart 9 Heart 10 Heart Jack Heart Queen Heart King

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!