subject

In the card game named 'blackjack' players get two cards to start with, and then they are asked whether or not they want more cards. Players can continue to take as many cards as they like. Their goal is to get as close as possible to a total of 21 without going over. Face cards have a value of 10 Write a command line game that plays a simple version of blackjack. The between 1 and 10 each time the player gets a card. It should keep a running total of the play whether or not it should deal another card. Sample output for the game is written below. Your program should produce the same output. program should generate random number ers cards, and ask the player » First cards: 3, 2 » Total: 5 > Do you want another card? (y/n): y > Card: 6 Tota1: 11 > Do you want another card? (y/n): y > Card: 7 Tota1: 19 Do you want another card? (y/n): n > Would you like to play again? (y/n): y > First cards: 10, 2 > Total: 12 > Do you want another card? (y/n): y > Card: 6 > Total: 18 > Do you want another card? (y/n): y > Card: 7 Total: 25 Bust. > Would you like to play again? (y/n): n Note: You can generate random numbers using the Random class. Here is a tiny class that generates either a 0 or a l import java. util. public class RandomTest ( public static void main (String args[) Random random = new Random(); System. out-println (random. nextint (2))

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Formula that contains a nested function that first calculates the average of the values in range e6: p6 and uses the round function to round that average to the nearest 10 dollars. use -1 for the value of the number digit argument. would the formula be =round(average(e6: p6),0
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
You know the right answer?
In the card game named 'blackjack' players get two cards to start with, and then they are asked whet...
Questions
question
Mathematics, 19.06.2020 21:57
question
Chemistry, 19.06.2020 21:57
Questions on the website: 13722362