Project #25737 - C++ Classes Lab

You are to write a driver program named CardShufflingDealingTester.cpp and associated classes (Card, DeckOfCards, Hand). Using an STL array or vector, have this array hold three decks of cards. Each deck will then be shuffled to output a Hand of five cards, meaning you will have 3 different hands with five cards each. The value of each Hand can then be calculated based on the value (using 11 for Jack, 12 for Queen, 13 for King, and 14 for Ace). Whichever hand has the greatest value wins!
To shuffle the cards in the deck, you should write a member function for the Deck class that uses the random number generator. One way to accomplish a shuffle is to generate two subscripts for the array that holds your 52 cards, then swap the cards that are at those locations in the array. Do this many times to fully shuffle the deck.
The output will consist of displaying the three hands of cards followed by the winning Hand with the value this Hand has. Be sure the output consists of legible columns.
An example run would result in:
Hand1: Spade7 Diamond3 Diamond10 ClubQ Heart2
Hand2: DiamondK HeartK Club2 Club5 Spade7
Hand3: HeartA DiamondJ Spade10 Club4 HeartQ
Hand3 won with a value of 51!

Subject Computer
Due By (Pacific Time) 03/23/2014 09:50 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy