Question: I am doing this in Eclipse Java IDE and if possible please write comments omn the code sections explaining what each part does. Thank you!
I am doing this in Eclipse Java IDE and if possible please write comments omn the code sections explaining what each part does. Thank you!
For this assignment you create the game of the CRAPS in ONE file only. Crapsjava
This program has TWO methods ONLY: main and RollDice.
Create a static method RollDice This method rolls two dice and return their sum and
will be called from the main method.
Use ENUMS for the status of the game. Example : enum Status CONTINUE, WON,
LOST
DO NOT use constants static final variables in this assignment.
DO NOT use switch statement in this assignment.
Basic rules for the dice game Craps:
You roll two dice.
If the sum is or on the first throw, you win.
If the sum is or on the first throw called "craps" you lose ie the "house"
wins
If the sum is or on the first throw, that sum becomes your "point." To win,
you must continue rolling the dice until you "make your point" ie roll that same point
value You lose by rolling a before making your point.
Sample Output:
Player rolled
Point
Player rolled
Player rolled
Player wins
Player rolled
Point
Player rolled
Player rolled
Player rolled
Player loses
Fig. Craps class simulates the dice game craps. Part of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
