Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ please. This project may be done with one other person. Verification must be done by either Professor Jackie Kuehn, Ben Hamrick, James Howard,

In C++ please.

This project may be done with one other person. Verification must be done by either Professor Jackie Kuehn, Ben Hamrick, James Howard, Joseph Appleton, or Selah Argent. The person verifying your program must submit a comment with your assignment. Each pair will turn in one assignment, a zipped file with the entire project with clear comments indicating both partners. This project is a simplified version of the casino card game Blackjack. The game works like this. Each player tries to reach a total of 21 without exceeding that amount. Numbered cards count as their face value. An ace counts as either one or 11 (whichever is best for the player) and any jack, queen, or king counts as 10.

The computer is the casino or house and it competes against one to seven players. At the beginning of the round, all participants, including the house, are dealt two cards. Players can see all of their cards, along with their total. However, the houses cards are hidden for the time being.

Next, each player gets a chance to take additional one additional card at a time for the time being. If a players total exceeds 21 (known as busting), the player loses. After all players have had a chance to take additional cards, the house reveals its hidden cards. The house must take additional cards as long as its total is 16 or less. If the house busts, all players who have not busted win. Otherwise, each remaining players total is compared to the houses total. If the players total is greater than the houses, he wins. If the two totals are the same, the player, ties the house (AKA pushing). You may have ties in this game.

You will need the following classes to design this program: Card, Hand, Deck, GenericPlayer, Player, House, and Game. You will use only public inheritance. A Deck class inherits from a Hand class. A GenericPlayer class is an abstract class. A Player class and a Hand class inherits from a GenericPlayer class.

The Deck class will create a deck of 52 cards, shuffle cards, deal cards to a hand, and give additional cards to a player for as long as a player wants to hit. A card class will indicate whether the card is face up, return the card value and flip a card. The Hand class adds cards to the hand and returns the total value of the hand.

Following is an example input/output:

Welcome to Blackjack! How many players (1-7)? 3 Enter player name: Jessica Enter player name: Joshua Enter player name: Jackie

Jessica AD JC (11 or 20) Joshua 6C KH (16) Jackie 7H 4S (11) House xx xx

Jessica do you want to hit (Y or N)? N Joshua do you want a hit (Y or N)? Y Joshua 6C KH 7S (23) Joshua busts.

Jackie do you want a hit (Y or N)? Y Jackie 7H 4S 3C (14) Jackie do you want a hit (Yor N)? Y Jackie 7H 4S 3C JD (24) Jackie busts.

House: 7H 3S (10) Jessica wins.

Do you want to play again (Y or N)? Y

Play the game using 2 players. Is the winner correct? Are the cards random? Play the game again using 2 players. Is the winner correct? Are the cards random?

Extra Credit: (5 points) Have a betting scheme. The house only shows the first card. Let each player start with a certain amount of money $500. They can bet up to $100 each round and they must bet in $100 increments.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing The Art and Science of Assurance Engagements

Authors: Alvin A. Arens, Randal J. Elder, Mark S. Beasley, Joanne C. Jones

13th Canadian edition

133405508, 978-0133405507

More Books

Students also viewed these Accounting questions

Question

Know how to create a position description

Answered: 1 week ago