Write a java program for a dice game. The player can roll a dice as many times as he/she wants. In each rolling, the program displays the face value, and add the value into a running total. Then this...

Write a java program for a dice game. The player can roll a dice as many times as he/she wants. In each rolling, the program displays the face value, and add the value into a running total. Then this program will check with the player for continue or stop (s). When the player calls stop, stop the game and display the game report: how many times has the player rolled the dice and what are the total value got in this game. Requirements: a) Use a random number to simulate rolling a dice. A dice value should be between 1 and 6. b) Use a sentinel to control the loop. At the end of the loop body. Provide instruction or prompt message to the players. If the player types ‘s’, in upper case or lower case, the program will stop the loop, and display the game report. c) Need two variables, one to record the time count of dice rolling, and one to record the running total of the dice values. d) Name this class and the java file as Sentinel Dice Game and SentinelDiceGame.java.

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here