Question
******Give solutions and Explain the following **** Create a class file named: Roulette. All work for this problem will occur in that file. Make a
******Give solutions and Explain the following ****
Create a class file named: Roulette.
All work for this problem will occur in that file. Make a simple Roulette simulator.
a. When the user begins ask them how much money they have
b. Before each spin: Ask the user how much they want to bet. Don't let them bet more than they have left!
c. Ask the user what number they want to bet on (between 1-36) d. Spin the wheel
You can use RANDOM GENERATOR to generate a random integer value between 0 and number.
-----------( So, if you used x = 3, then x would randomly be 0,1,2, or 3)-------------------
e. If the random number is not what the user chose, subtract the amount the user bet from their total amount.
f. If the random number is what the user chose, add 35 times what the user bet to their total. (So, if the user bets $2, then add $70 dollars to the total).
g. Print the total amount of money the user has.
h. At the end of each spin
i. If the user is out of money print "Womp Womp..." and don't let them play again
ii. If the user has money, then ask the user if they want to play again. If the user says yes. Then run the whole process again
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started