Question: For this assignment you are adding functionality to a slot machine simulation to make it more like a real slot machine using netbeans/java. you need

For this assignment you are adding functionality to a slot machine simulation to make it more like a real slot machine using netbeans/java. you need to include clear comments throughout the program that explain what functionality the various lines/small sections of code/methods are as related to the execution of the program.:

-The user begins with a balance of $20

-Each spin costs $1 (note: the first spin should happen automatically)

-If the user gets 2 numbers the same, s/he wins $2 (provide feedback)

-If the user gets all 3 numbers the same, s/he wins $25 (provide feedback)

-After each spin (and balance update), the users balance needs to be printed to the screen and formatted as currency prior to asking him/her if s/he would like to spin again

-The program needs to end when the user no longer has an adequate balance to spin again (less than $1)

-When the program ends, print a thank you message to the user.

-Once the program has ended, print a message to the user to pick up his/her winnings if his/her balance is greater than $1; include the balance in the message.

Sample output from the start of the program

 --------------Welcome to Sue's Slot Machine!-------------- Each spin costs $1. Get 2 numbers the same, add $2. Get a jackpot (all three numbers the same) and you win $25. Your starting balance is $20.00 ---------------SPINNING----------------- |-|-|-| |8|2|1| |-|-|-| Your current balance is $19.00 Do you want to spin again (Y/N)? y ---------------SPINNING----------------- |-|-|-| |0|4|7| |-|-|-| Your current balance is $18.00 

Sample output from the end of the program (user has a positive balance)

 ---------------SPINNING----------------- |-|-|-| |8|8|0| |-|-|-| **So close -- better luck next time! Your current balance is $7.00 Do you want to spin again (Y/N)? n Thanks for playing my Slot Machine! Please pick up your $7.00 winnings from the cashier.   

Sample output from the end of the program (user runs out of money)

  Do you want to spin again (Y/N)? y ---------------SPINNING----------------- |-|-|-| |5|0|4| |-|-|-| Your current balance is $0.00 Sorry, you have run out of money... Thanks for playing my Slot Machine! 

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!