Question: You will use the Casino.java (that is provided) to drive the Roulette class (that you will create). Here is the code for the Casino.java import

You will use the Casino.java (that is provided) to drive the Roulette class (that you will create). Here is the code for the Casino.java import java.util.*; public class Casino { public static void main (String[] args) { Scanner console = new Scanner (System.in); double wallet = 100.00; //Start the user off with $100 double bet = 0.00; //User bet double result = 0.00; //To store the winnings/losses of each game String input = \"\"; //User input //Create instance of the Roulette game (that you're creating) Roulette game = new Roulette(); do { System.out.println(\"How much would you like to bet?\"); bet = console.nextDouble(); wallet = wallet - bet; //Play a round and store the results result = game.betOnce(bet); //Flush the buffer console.nextLine(); //Update wallet amount and notify user wallet = wallet + result; System.out.println(\"You have $\" + wallet + \" in your wallet.\"); System.out.println(\"Bet again? Y or N?\"); input = console.nextLine(); } while (!input.equalsIgnoreCase(\"N\")); } //end main } //end class Your job is to create the Roulette class to interact with the Casino class to allow the user to play the game of Roulette. Here are the rules: Create a class named Roulette with a method named betOnce that takes, as parameters, the amount of the user bet. Generate a random number between 0 and 36 (that simulates the wheel - must use Math.random and set the range so it will only return the roulette numbers 0-36) The user should be prompted to place their bet on 1) Low or 2) High or 3) a Number Use the swtich statement . If the user selected 3) a Number, prompt the user to enter a guess between 1 and 36. If the user selected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!