Question
C++ Write a Card class in a header file with two variables: Suit and value the Card Class should have these methods: 1. A default
C++
Write a Card class in a header file with two variables: Suit and value
the Card Class should have these methods:
1. A default constructor with no parameters. Does nothing
2. A constructor method with 2 parameters that initializes the card's suit and value
3. A getValue method that returns a string of the card's value
4.A getSuit method that returns a string of the card's suit.
5. A print method that prints out the Value and suit. Example: "Queen of Diamonds"
Write a .cpp file that implements the methods in the Card Class.
Also write a.main file, that does the following:
write a shuffle function that takes an array of cards and the array length as parameters that rearranges the cards.
and Declare an array of 52 objects representing the cards
Write a loop printing out the items in the array
Call the shuffle function
write a loop printing out the items in the array again
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started