Answered step by step
Verified Expert Solution
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
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 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started