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

Write a Java program to simulate Blackjack. The program should be as basic as po

ID: 3720959 • Letter: W

Question

Write a Java program to simulate Blackjack. The program should be as basic as possible while following the rules below. Can you please follow the rules below making a Hand class and a BlackJackHand extends Hand . Thanks

a. There is one deck of cards

b. Cards are drawn randomly using (Shuffle() 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 four 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 (AddCard() method) as needed until the total value of the hand is equal or greater than its random number

j. You dont need to re-shuffle the remaining cards after each drawing

k. You should have a class Hand, in which you compute and return the value of a hand based on the above rules

l. 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)

m. Log all drawn cards and the total value of a hand

n. Sort the cards in the hand so that cards of the same suit are grouped together, and within a suit the cards are sorted by value. Cards are sorted into order of increasing value. Note that aces are considered to have the lowest value.

Explanation / Answer

BlackJack.java

************************

Card.java

************************

Deck.java

************************

Hand.java

************************

?

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote