Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 438 Weeks Ago, 2 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 28 Jul 2017 My Price 6.00

Card Shuffling and Dealing

(Project: Card Shuffling and Dealing) Modify the application developed in Exercise 7.31 so that it can simulate the dealer. The dealer’s five-card hand is dealt “face down,” so the player cannot see it. The application should then evaluate the dealer’s hand, and, based on the quality of the hand, the dealer should draw one, two or three more cards to replace the corresponding number of unneeded cards in the original hand. The application should then reevaluate the dealer’s hand. [Caution: This is a difficult problem!]

Exercise 7.31

 (Card Shuffling and Dealing) Use the methods developed in Exercise 7.30 to write an application that deals two five-card poker hands, evaluates each hand and determines which is better.

Exercise 7.30

Once you’ve done them, you ought to be able to implement most popular card games easily.

(Card Shuffling and Dealing) Modify the application of Fig. 7.11 to deal a five-card poker hand. Then modify class DeckOfCards of Fig. 7.10 to include methods that determine whether a hand contains

a) a pair

b) two pairs

c) three of a kind (e.g., three jacks)

d) four of a kind (e.g., four aces)

e) a flush (i.e., all five cards of the same suit)

f) a straight (i.e., five cards of consecutive face values)

g) a full house (i.e., two cards of one face value and three cards of another face value)

 

 

Answers

(8)
Status NEW Posted 28 Jul 2017 11:07 AM My Price 6.00

-----------

Attachments

file 1501240537-1856763_1_636361724334196737_Prog-Sol.docx preview (487 words )
1----------- /*-----------Sol-----------uti-----------on -----------beg-----------ins----------- he-----------re*-----------/ -----------2 #-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;st-----------dio-----------.h&-----------amp-----------;gt-----------; -----------3 #-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;st-----------dli-----------b.h-----------&am-----------p;g-----------t; ----------- 4 -----------#in-----------clu-----------de -----------&am-----------p;l-----------t;t-----------ime-----------.h&-----------amp-----------;gt-----------; -----------5 -----------6 /-----------* f-----------unc-----------tio-----------n p-----------rot-----------oty-----------pes----------- */----------- 7----------- vo-----------id -----------shu-----------ffl-----------e( -----------int----------- wo-----------rkD-----------eck-----------[][----------- 13----------- ] -----------); ----------- 8 -----------voi-----------d d-----------eal-----------( i-----------nt -----------wor-----------kDe-----------ck[-----------][ -----------13 -----------], -----------cha-----------r *-----------wor-----------kFa-----------ce[-----------], -----------cha-----------r *-----------wor-----------kSu-----------it[-----------] )-----------; -----------9 -----------10 -----------int----------- ma-----------in(-----------) -----------11 -----------{ -----------12 -----------int----------- ca-----------rd -----------= 1-----------; /-----------* c-----------ard----------- co-----------unt-----------er -----------*/ ----------- 13----------- in-----------t r-----------ow;----------- /*----------- lo-----------op -----------cou-----------nte-----------r *-----------/ -----------14 -----------int----------- co-----------lum-----------n; -----------/* -----------loo-----------p c-----------oun-----------ter----------- */----------- 1-----------5 i-----------nt -----------dec-----------k[ -----------4 ]-----------[ 1-----------3
Not Rated(0)