In the Game of 21, a player is dealt two cards from a deck of playing cards and then optionally given a third card. The player closest to 21 points without going over is the winner. Use object-oriented development to create a Game of 21 application that allows the user to play the Game of 21 against the computer. The Game of 21 application and its objects should: • Deal a card from a deck of playing cards by generating a random number between 1 and 13. A 1 corresponds to an Ace, numbers 2 through 10 correspond to those cards, and 11 through 13 corresponds to Jack, Queen, and King. The Jack, Queen, and King have a value of 10 in the Game of 21. An Ace can have a value of either 1 or 11. • Allow the player to stay with two cards or be given a third card. • Announce the winner. • Play rounds until the player says to stop
PLEASE USE 2 CLASSES (you do not have to answer quickly please take your time)
In the Game of 21, a player is dealt two cards from a deck of playing cards and then optionally given
a third card. The player closest to 21 points without going over is the winner. Use object-oriented
development to create a Game of 21 application that allows the user to play the Game of 21 against the
computer. The Game of 21 application and its objects should:
• Deal a card from a deck of playing cards by generating a random number between 1
and 13. A 1 corresponds to an Ace, numbers 2 through 10 correspond to those cards,
and 11 through 13 corresponds to Jack, Queen, and King. The Jack, Queen, and King
have a value of 10 in the Game of 21. An Ace can have a value of either 1 or 11.
• Allow the player to stay with two cards or be given a third card.
• Announce the winner.
• Play rounds until the player says to stop
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images