Craps Test Java

Posted onby
Craps Test Java Average ratng: 5,6/10 4708 votes

A simple Tetris clone written in Java. GitHub Gist: instantly share code, notes, and snippets. Using Java create a craps game prompting users to play bets, tracking win / lose records. Keeping track of bet winnings and losses. If user doesn't have enough money to continue bets end game. JAVA: MUST BE DONE IN JAVA. Assignment: Write algorithms and programs to play “non-betting” Craps.Craps is a game played with a pair of dice. In the game, the shooter (the player with the dice) rolls a pair of dice and the number of spots showing on the two upward faces are added up.

Test

In the game of craps, a pass line bet proceeds as follows: Twosix-sided dice are rolled; the first roll of the dice in a crapsround is called the “come out roll.” A come out roll of 7 or 11automatically wins, and a come out roll of 2, 3, or 12 automaticallyloses. If 4, 5, 6, 8, 9, or 10 is rolled on the come out roll, thatnumber becomes “the point.” The player keeps rolling the diceuntil either 7 or the point is rolled. If the point is rolled first,then the player wins the bet. If a 7 is rolled first, then the playerloses.

Write a program that simulates a game of craps using these ruleswithout human input. Instead of asking for a wager, the programshould calculate whether the player would win or lose. The programshould simulate rolling the two dice and calculate the sum. Add aloop so that the program plays 10,000 games. Add c ounters that counthow many times the player wins, and how many times the player loses.At the end of the 10,000 games, compute the probability of winning[i.e., Wins / (Wins + Losses) ] and output this value. Over the longrun, who is going to win the most games, you or the house?


  • DueMay 9, 2017 by 11:59pm
  • Points40
  • Submittinga file upload
  • File Typesjava

Start with ProjectTemplate.java and convert the Craps game source code from chapter 6 to a JavaFX app.

Submit your finished application. Make sure you compile and test your code.

Craps Test Java Questions

Additional Comments:
Can't change a rubric once you've started using it.

Craps Test Javascript

Find Rubric
Craps

Craps Test Java Game

You've already rated students with this rubric. Any major changes could affect their assessment results.

Verify Java

CriteriaRatings Pts
Description of criterion
threshold: 5 pts
5to >0 pts blank
0to >0 pts blank_2
This area will be used by the assessor to leave comments related to this criterion.
/ 5 pts
Total Points: 5 out of 5