Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions 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
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education