subject

Solution, must be object oriented design remonstrated with a driver. Welcome the user with a message that you read from a file called "input. txt".Write the results of the game to the terminal and also to the output file called, "output. txt" and remind the user to look at that file if he/she wants to. Write a program that uses the Die class that was presented in Chapter 4 to write a programthat lets the user play against the computer in a variation of the popular blackjack cardgame. In this variation of the game, two six-sided dice are used instead of cards. The diceare rolled, and the player tries to beat the computer’s hidden total without going over 21.Here are some suggestions for the game’s design: Each round of the game is performed as an iteration of a loop that repeats as long asthe player agrees to roll the dice, and the player’s total does not exceed 21. At the beginning of each round, the program will ask the user whether he or she wantsto roll the dice to accumulate points. During each round, the program simulates the rolling of two six-sided dice. It rollsthe dice first for the computer, and then it asks the user if he or she wants to roll. (Usethe Die class that was demonstrated in Chapter 4 to simulate the dice). The loop keeps a running total of both the computer and the user’s points. The computer’s total should remain hidden until the loop has finished. After the loop has finished, the computer’s total is revealed, and whoever the playerwith the most points without going over 21 wins. Expert Answer

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:30, chastineondre7979
How will you cite information that is common knowledge in your research paper?
Answers: 1
image
Computers and Technology, 22.06.2019 05:00, edjiejwi
Lisa has a section of her document that she would like to include in the index. which option should lisa choose? mark index mark entry insert endnote add text
Answers: 3
image
Computers and Technology, 22.06.2019 21:30, sunshinekisses
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, zay179
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
You know the right answer?
Solution, must be object oriented design remonstrated with a driver. Welcome the user with a message...

Questions in other subjects: