Question: 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

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: 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 column. Three same numbers in any of the 2 diagonals.

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 Databases Questions!