Question: Please write this code in Java and if you can explain that would be great so I can understand it. Thank you!!! Exercise 2 of
Please write this code in Java and if you can explain that would be great so I can understand it.
Thank you!!!

Exercise 2 of 2: Slot Machine 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 3 3 1 3 0 2 116 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
