Design a roulette wheel which allows the user to enter bets on multiple numbers. Allow the user to stop betting when they enter 0 on a bet. The program will then choose a random number between 0 and 36. If the user wins, they will get back 30 times the amount they bet on that number. The program will print out the winning number as well as how much they won or lost.  Create an array to store the numbers the user bet on.  Create a corresponding array to store the amount they bet on each number. o int[] bets=new int[36];//To store the person's bets o int[] amount =new int[36];//To store the amount of the bet  Ask them what numbers they want to bet on and how they want to bet. Store these in the arrays.  The program chooses a winning random number.  Check to see if any of their bets match the correct number.  If they have the correct number tell them this and inform them as to how much they won or lost.  If they did not get the correct number tell them this and tell them how much they lost.  Print the winning number

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter6: Using Arrays
Section: Chapter Questions
Problem 5E
icon
Related questions
Question

Design a roulette wheel which allows the user to enter bets on multiple numbers. Allow the user to stop
betting when they enter 0 on a bet. The program will then choose a random number between 0 and 36.
If the user wins, they will get back 30 times the amount they bet on that number. The program will print
out the winning number as well as how much they won or lost.
 Create an array to store the numbers the user bet on.
 Create a corresponding array to store the amount they bet on each number.
o int[] bets=new int[36];//To store the person's bets
o int[] amount =new int[36];//To store the amount of the bet
 Ask them what numbers they want to bet on and how they want to bet. Store these in the arrays.
 The program chooses a winning random number.
 Check to see if any of their bets match the correct number.
 If they have the correct number tell them this and inform them as to how much they won or lost.
 If they did not get the correct number tell them this and tell them how much they lost.
 Print the winning number

 

 

Program 3: (Based on arrayhw4 in the chapter 7 project).
Create your own SAT exam.
There will be three sections, each section will have a corresponding array for the true answers and an
array to store the student’s answers. Each section has 5 questions.
Example-For section 1:
char[] answers1 = {'A','C','A','D','E'}; //correct answers
char[] sanswers1 = new char[answers1.length]; //to store the student’s answers
Scoring is done as follows:
 Base score is 200
 For each correct answer in section 1 they get 20 points. For each incorrect answer 5 points is
deducted.
 For each correct answer in section 2 they get 40 points. For each incorrect answer 10 points is
deducted.
 For each correct answer in section 3 they get 60 points. For each incorrect answer 15 points is
deducted.
 Ask the questions
 Compute the score
o If their score is less than 200 give them a score of 200

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning