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. (Craps.java)
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 7 or 11 on the first throw, you win.
If the sum is 2,3 or 12 on the first throw (called "craps"), you lose (i.e., the "house"
wins).
If the sum is 4,5,6,8,9 or 10 on the first throw, that sum becomes your "point." To win,
you must continue rolling the dice until you "make your point" (i.e., roll that same point
value). You lose by rolling a 7 before making your point.
Sample Output:
Player rolled 5+4=9
Point is9
Player rolled 4+2=6
Player rolled 3+6=9
Player wins
Player rolled 2+6=8
Point is8
Player rolled 5+1=6
Player rolled 2+1=3
Player rolled 1+6=7
Player loses
Fig. 6.8| Craps class simulates the dice game craps. (Part 5 of 5.)
 I am doing this in Eclipse Java IDE and if possible

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!