Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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_2

Step: 3

blur-text-image_3

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions