Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

******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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago