Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

UML Class Diagram Flow of Play Your poker game\'s play() method should operate a

ID: 3541869 • Letter: U

Question

UML Class Diagram



Flow of Play

Your poker game's play() method should operate as follows:

1. Deal the player five cards and display the results on the screen

2. Ask the player which cards he or she would like to exchange

3. Remove the desired cards from the player's hand

4. Deal the player N new cards (N = exchange amount)

5. Display the new hand on the screen

6. Deal the computer five cards and display the results on the screen

7. The computer determines how many cards to exchange based on the following logic:

a. zero cards if the computer has a four of a kind, full house, straight, or flush

b. one card if the computer has two pair

c. two cards if the computer has three of a kind

d. three cards if the computer has a pair

e. five cards if the computer has none of the above

8. Remove the appropriate number of cards in the computer's hand

9. Deal the computer the appropriate number of replacement cards

10. Display the new hand on the screen

11. Determine the winner of the game based on the following rankings:

a. Four of a kind

b. Full house

c. Flush

d. Straight

e. Three of a kind

f. Two Pair

g. Pair

h. High Card (ordered by Spade, Heart, Diamond, with Club being the lowest)

12. Indicate the winner on the screen



UML Class Diagram Your poker game's play() method should operate as follows: Deal the player five cards and display the results on the screen Ask the player which cards he or she would like to exchange Remove the desired cards from the player's hand Deal the player N new cards (N = exchange amount) Display the new hand on the screen Deal the computer five cards and display the results on the screen The computer determines how many cards to exchange based on the following logic: The computer determines how many cards to exchange based on the following logic: zero cards if the computer has a four of a kind, full house, straight, or flush one card if the computer has two pair two cards if the computer has three of a kind three cards if the computer has a pair five cards if the computer has none of the above Remove the appropriate number of cards in the computer's hand Deal the computer the appropriate number of replacement cards Display the new hand on the screen Determine the winner of the game based on the following rankings: Four of a kind Full house Flush Straight Three of a kind Two Pair Pair High Card (ordered by Spade, Heart, Diamond, with Club being the lowest) Indicate the winner on the screen

Explanation / Answer

It is not the same....but u can try this code for a poker game and make the changes if required

dreamincode.net/forums/index.php?app=core&module=attach&section=attach&attach_id=12121&s=553e0c932b5629171795cbe9cbe8803b


If not helpful,don't rate
thanks