Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago