Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW 0 2 [ 1 0 0 pts ] - PLEASE USE C + + and DO NOT USE VECTORS! I already know to start

HW02[100 pts]- PLEASE USE C++ and DO NOT USE VECTORS! I already know to start with enums that are suits, ranks, but im unsure how to continue from there :(.
Write a class that will represent a card in a standard deck of
playing cards. You will need to represent both the suit (clubs,
diamonds, hearts or spades) as well as the rank (A,K,Q,J,10,
9,8,7,6,5,4,3,2 of each card.
b. Write methods to
Initialize the deck of cards
Perform a perfect shuffle
In a perfect shuffle, the deck is broken exactly in half and
rearranged so that the first card is followed by the 27th card,
followed by the second card, followed by the 28th card, and so
on.
Print the deck of cards
Compare two decks of cards
c. Print out the initial, the deck after the first perfect shuffle,
and the final deck.
d. Print out how many perfect shuffles are necessary to return
the deck to its original configuration.
image text in transcribed

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago