Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You will use the Casino.java (that is provided) to drive the Roulette class (tha

ID: 3659862 • Letter: Y

Question

You will use the Casino.java (that is provided) to drive the Roulette class (that you will create). 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) The user should be prompted to place their bet on 1) Low or 2) High or 3) a Number If the user selected 3) a Number, prompt the user to enter a guess between 1 and 36.

If the user selected

Explanation / Answer

import java.io.*; import java.lang.Math.*; import java.util.Scanner; public class Roulette { public static void main(String args[]) { Roulette r=new Roulette(); System.out.println("Enter the bet amount"); Scanner in=new Scanner(System.in); int amt=in.nextInt(); r.betOnce(amt); } public static void betOnce(int amount) { double ran = Math.random(); double rand; rand = 36*ran; System.out.println("Enter Your choice 1.Low 2.High 3.Enter the number between 0 1nd 36"); int ch,ch2; Scanner in = new Scanner(System.in); ch =in.nextInt(); switch(ch) { case 1: if((amount>0)&&(amount18)&&(amount
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote