Question: Please help me solve this problem by writing the code in java language Problem : You are planning a trip to Atlantic City this summer;
Please help me solve this problem by writing the code in java language
Problem: You are planning a trip to Atlantic City this summer; with the anticipation of the trip, you want to create a slot machine app. And since you are a history buff, you would like to recreate one of the first ones, the Liberty Bell machine (but simplified).
You will create a three-reel machine that will spin and state the results of the spin.
The symbols on your machine are:
- The Liberty Bell
- Horseshoes
- StarThe winning combos are:
- 3 bells = 20 points
- 3 horseshoes = 10 points
- 2 horseshoes and 1 star = 5 points
Procedure:
- Assign int values to your symbols
- Spin (generate a random number within your symbols range ) 3 times (no loops, no arrays) (pages 87-88 & 122)
- Determine (by checking against the winning combos) and print the results to the screen
Sample run:
Welcome! Let's spin the Liberty Bell Machine and see if you are lucky!
Bells are ones, horseshoes are twos, and stars are threes
Reel one is: 2
Reel two is: 3
Reel three is: 3
Sorry, better luck next time!
Thanks for playing the Liberty Bell!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
