Question: Casino Crabs program using java. The purpose of this project is to use nested while loops, if/else or switch statements to play a game of
Casino Crabs program using java.
The purpose of this project is to use nested while loops, if/else or switch statements to play a game of craps casinostyle.
Requirements: You are required to use while loops (or for loops if you prefer) and either nested if/else statements or switch statements to do this project. You also need to use the java.util.Random class to produce a different set of rolls each time it is run. I will be checking by running your program more than once.
Example run:
&& WELCOME TO CASINO CRAPS && You have a pot of 100 coins. How much do you want to bet?
50
Rolling dice...
You rolled a 5 and a 5 For a total of 10 Your point is 10.
Rolling dice...
You rolled a 4 and a 1
For a total of 5
Rolling dice...
You rolled a 5 and a 2
For a total of 7
You LOSE!
Your pot is now 50 coins. Do you want to play again? (1 for yes, 0 for no)
1
You have a pot of 50 coins. How much do you want to bet?
20
Rolling dice...
You rolled a 6 and a 3
For a total of 9
Your point is 9.
Rolling dice...
You rolled a 4 and a 2
For a total of 6
Rolling dice...
You rolled a 4 and a 2
For a total of 6
Rolling dice...
You rolled a 5 and a 4
For a total of 9
You WIN!
Your pot is now 70 coins. Do you want to play again? (1 for yes, 0 for no)
1
You have a pot of 70 coins. How much do you want to bet?
190 Thats not a valid bet. Please enter an amount less than 70
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
