Question: Program Specification: Write a Java program that allows the user to play roulette. In our version of roulette, the roulette wheel has the following characteristics:
Program Specification:
Write a Java program that allows the user to play roulette. In our version of roulette, the roulette wheel
has the following characteristics:
Slots are numbered from to
Even numbered slots except are colored Red
Odd numbered slots are colored Black
The slot is colored Green
The user starts with chips, and each round can place one the following two types of bets or quit
cash out:
Bet on a specific number payout is :
Bet on either Red or Black color payout is :
Cash out
Your program should behave as follows:
Display a welcome message
Repeatedly do the following:
Ask the user to choose a bet type or cash out
if number bet or color bet
If number bet : Ask the user for the number to bet on
If color bet : Ask the user for color to bet on
Ask the user to choose an amount to bet between chip and the total number of chips the
user currently has and record the bet amount
Spin the wheel and report the number and color
Inform the use of their winloss status, and updated the users chip total appropriately
Until the user chooses to cash out or has no more chips left to bet
Once the user chooses to cash out a final report is displayed indicating the users winnings or loses
relative to their starting with chips
Rules and Requirements:
All user input must be validated
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
