Question: Specify, design and implement a class for a playing card found in a deck of cards. Create a complete C++ program that uses and tests

Specify, design and implement a class for a playing card found in a deck of cards. Create a complete C++ program that uses and tests all listed functionality.

Use integer values to store values for the rank and suit of a given card.

Playing cards generally have 13 ranks (2,3,4,5,6,7,8,9,10,Jack,Queen,King,Ace) Playing cards generally have 4 suits (Hearts, Diamonds, Spades, Clubs)

Make sure the rank and suit are always valid values

The PlayingCard class you develop must have the follow characteristics:

Constructor

GetRank() function

GetSuit() function

Overload of << operator (friend function) to print something like "2 Hearts" or "2" to the screen

NOTE: Once an object is constructed, changing the rank or suit of the card is not allowed

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!