Microsoft Word - homework 2.docx Homework 2 – The Deal Write a program that creates a deck of cards, shuffles it, and deals cards to each of four players. First display a menu, asking if user wants to...

c++


Microsoft Word - homework 2.docx Homework 2 – The Deal Write a program that creates a deck of cards, shuffles it, and deals cards to each of four players. First display a menu, asking if user wants to shuffle, deal, or end. After each deal, display cards of each player in sorted order, followed by the location of the Club Two: Lady Gaga Albert Einstein Muhammed Ali Diego Maradona ---------- ---------- ----------- ---------- Spade Ace Spade Jack Spade 6 Spade King Spade 10 Spade 8 Spade 2 Spade Queen Spade 5 Spade 4 Diamond King Spade 9 Heart King Spade 3 Diamond Queen Spade 7 Heart Queen Heart Ace Diamond Jack Heart 7 Heart 10 Heart Jack Diamond 9 Heart 6 Heart 8 Heart 9 Diamond 8 Heart 5 Heart 4 Diamond Ace Diamond 6 Diamond 4 Heart 3 Diamond 10 Diamond 5 Diamond 2 Heart 2 Diamond 3 Club King Club Ace Diamond 7 Club 9 Club 10 Club Queen Club Jack Club 7 Club 6 Club 5 Club 8 Club 4 Club 2 Club 3 Club Two – player 3 card 13 Begin with your code from the Deck of Cards Lab. Your program should have three classes, each in a separate file, with these members: Card members: • suit - enumerated data type for SPADE, HEART, DIAMOND, CLUB • number – integer between 1 and 13 • description - string containing name of card, such as Heart Ace • overloaded < operator,="" which="" returns="" true="" or="" false="" using="" these="" rules:="" 1.="" regardless="" of="" card="" number,="" clubs="">< diamonds="">< hearts="">< spades="" 2.="" if="" suits="" are="" the="" same,="" ‘less="" than’="" is="" determined="" by="" card="" numbers,="" except="" all="" card="" numbers="" are="" ‘less="" than’="" 1="" (ace)="" deck="" members:="" •="" deck="" –="" array="" of="" 52="" cards="" •="" void="" shuffle()="" –="" shuffles="" deck="" randomly="" player="" members:="" •="" hand="" –="" array="" of="" 13="" cards="" •="" name="" –="" string="" containing="" player="" name="" •="" void="" sort()="" –="" sorts="" hand="" into="" order="" using="">< operator of card class • int clubtwo() – returns index of club two in hand, or -1 if club two is not in this hand add members of these three classes as needed, including constructors, get and set functions, and fields. you may not use library sort or shuffle methods – you must write them yourself! operator="" of="" card="" class="" •="" int="" clubtwo()="" –="" returns="" index="" of="" club="" two="" in="" hand,="" or="" -1="" if="" club="" two="" is="" not="" in="" this="" hand="" add="" members="" of="" these="" three="" classes="" as="" needed,="" including="" constructors,="" get="" and="" set="" functions,="" and="" fields.="" you="" may="" not="" use="" library="" sort="" or="" shuffle="" methods="" –="" you="" must="" write="" them="">
Oct 23, 2020
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here