Write a program to play a game of craps a dice game popular


Program: Write a program to play a game of "craps," a dice game popular in casinos. Here are the rules:

A player rolls two dice. Each die has six faces. These faces contain 1, 2, 3, 4, 5, and 6 spots. After the dice have come to rest, the sum of the spots on the two upward faces is calculated. If the sum is 7 or 11 on the first throw, the player wins. If the sum is 2, 3, or 12 on the first throw (called "craps"), the player loses (the "house" wins). If the sum is 4, 5, 6, 8, 9, or 10 on the first throw, then that sum becomes the player's "point."

To win, you must continue rolling the dice until you "make your point." The player loses by rolling a 7 before making the point.

Use functions appropriately. The program should allow the user to play another round.

Set up a betting scheme, letting the user set an opening pot (how much money s/he is willing to lose) and decide how much money to bet on each round. The player may choose to quit with winnings or may play until the opening pot is empty.

Be sure to include comments. The comment should describe the purpose of the program and the data to be entered.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a program to play a game of craps a dice game popular
Reference No:- TGS0952111

Expected delivery within 24 Hours