Question: Program Specification Write a Javs program that allows the user to play roalette. In our vension of roulettle, the roulette wheel bas the folowing characteristio
Program Specification Write a Javs program that allows the user to play roalette. In our vension of roulettle, the roulette wheel bas the folowing characteristio - Slots are nmbered froes 0 to 36 . Even numbered slots (except 0) are eoloend Red .Odd mambered slots are coloeed Black The 0 skot is colored Green The user starts with 100 chips, and each round can place one the following two types of bets- or quit (cash ost) . Bet on a specific number [1, 36 Cpayout is 351 . Bet on either Red or Black color (payout is 1:1) . Cash out Your program should behave s follows .Dieplay a weloome Repeatedly do the following - Ask the user to chose a bet type (or caeh out) if mker bet or eolor bet .Ask the user for the number - if mumber bet Ask the uer for color- if color bet Ask the uwer to choose an amount to bet (betwen 1 chip and the total samber of chige the user currently ba), and record the bet a Spin the wheel and report the number and color Inform the use of their win/loss Malus, and updiated the user's chip total appropriately Until the wer chooses to cuh out or has no more chigs left to be Once the user chomes to cauh out a fieal mpont is displayed indicating the user's winnings or ks (relative to their starting with 100 chige)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
