Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

>>>>>>>>>>>>>>>>>>>>IN JAVA Create a program that simulates playing on a Slot Machine, with the following specifications In the main class, create an object of type

>>>>>>>>>>>>>>>>>>>>IN JAVA

image text in transcribed

Create a program that simulates playing on a Slot Machine, with the following specifications In the main class, create an object of type SlotMachine This object has a function named "pullArm", which will start the slot machine process. The slot machine has a 3x3 window that shows the outcome (3 rows, 3 columns) Instead of pictures, our slot machine only has numbers (0-9). The first pull will produce a random 3x3 result of numbers, like this 3 9 8 8 9 3 1 0 2 The user can then choose to re-roll any amount of columns. If they chose to re-roll a column, three new random numbers are produced for that column. Then the user can do that same re-roll process once more, ultimately allowing for two re-rolls per column if desired. After the final numbers are produced, the user is told whether the produced numbers result in a win. Win conditions are as follows: Three same numbers per row Three same numbers per columrn. Three same numbers in any of the 2 diagonals. 3 9 8 89 3 0 2 3 3 1 8 16 116 3 1 Create a program that simulates playing on a Slot Machine, with the following specifications In the main class, create an object of type SlotMachine This object has a function named "pullArm", which will start the slot machine process. The slot machine has a 3x3 window that shows the outcome (3 rows, 3 columns) Instead of pictures, our slot machine only has numbers (0-9). The first pull will produce a random 3x3 result of numbers, like this 3 9 8 8 9 3 1 0 2 The user can then choose to re-roll any amount of columns. If they chose to re-roll a column, three new random numbers are produced for that column. Then the user can do that same re-roll process once more, ultimately allowing for two re-rolls per column if desired. After the final numbers are produced, the user is told whether the produced numbers result in a win. Win conditions are as follows: Three same numbers per row Three same numbers per columrn. Three same numbers in any of the 2 diagonals. 3 9 8 89 3 0 2 3 3 1 8 16 116 3 1

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

Step: 3

blur-text-image

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

5. A review of the key behaviors is included.

Answered: 1 week ago

Question

3. An overview of the key behaviors is presented.

Answered: 1 week ago