Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am only in computer science 3 so if you can keep it as simple as possible that would be great! e rules of the

image text in transcribed

I am only in computer science 3 so if you can keep it as simple as possible that would be great!

e rules of the game a. There is one deck of playing cards, therefore no duplicates b. Cards are drawn randomly (ShuffleO method). c. The value of a hand is computed by adding the values of the cards in hand. d. The value of a numeric card such as five is its numerical value. e. The value of a face card is 10. f. Ace is either 1 or 11 g. Ace is 11 unless it puts the total value of the hand over 21. h. Second, third or fourth Ace are all counted as 1 i. Generate a random number between 16-21. Keep drawing as many cards (AddCardO method) as needed until the total value of the hand is greater than this random number. This is the dealer, whom you play against. Other than the dealer there is only one player. For the dealer, you only need the total and not the actual cards. j. You do not need to declare a winner. You should have a class Hand, in which you compute and return the value of a hand based on the above rules. l. m. You should have a "public class BlackjackHand extends Hand", which notifies the user if it is a Blackjack (only two cards are drawn with the total value of 21) n. Sort the cards in hand, based on the color and then based on the numerical value, then log all drawn cards and the total value of a hand

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

Step: 3

blur-text-image

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions