It starts at 3. The number of coins bet changes. When user presses this button the number of coins betincreases by 1. When it reaches the max value of 3 and the user hits this button again then...



slot machine GUI javafx



It starts at 3. The number of coins bet changes. When user presses this button the number of coins bet increases by 1. When it reaches the max value of 3 and the user hits this button again then number of coins bet changes back to 1. Deposit Cash Takes the deposited amount and adds it to the bank assuming the user enters a valid deposit amount. The deposited amount in the TextField should be cleared when the user enters a valid deposit amount. The slot machine view should be updated to reflect the new deposited amount. If the user enters an invalid deposit amount (< 0 or an invalid number such as 100), then an appropriate error message should be output to the user using the alert box and focus be placed in the textfield so the user can easily correct. in this case, the bank should not be updated until the user enters a valid number. if you have any questions regarding this, please ask. now that you have created the gui for the slot machine, this phase of the project is to implement all of the event handlers for the gui and make your slotmachinegui fully functional. hint #1: the basics for each event handler have already been created in class and are in the slotmachineemulator. for slotmachineemulator we wrote methods for each of the menu items. each of these methods should be your template for the individual button event handlers. all you need to do is copy each of these methods from slotmachineemulator and paste them in your gui program. then convert all to event handlers or have the event handler for each button call these methods. then for each new method you need to change all of the command/console references such as printin or printf to be control references instead, test and you should be done. hint #2: use alert boxes to display error messages and warnings messages to the user. alert boxes were described in week 6 javafx java gui tutorial - 5 - creating alert boxes (10:53 min.) here is a summary (not everything) of what should happen for each button: cashout if there is a balance, then a message should be displayed to the user in an alert box indicating that ticket is printed, for a specific dollar amount, reminder to cashier. the slot machine view should be updated. ata minimum, balance should be 0. if no balance remains, the button should do nothing or should be disabled (user cannot press). max bet the number of coins bet should be set to 3. if remaining balance cannot cover bet, the button should not spin tumblers or the button should be disabled (user cannot press). if remaining balance can cover the bet, then the tumblers should spin and winnings should be computed and slot machine view should be updated. spin if remaining balance cannot cover bet, the button should not spin tumblers or the button should be disabled (user cannot press). if remaining balance can cover the bet, then the tumblers should spin and winnings should be computed and slot machine view should be updated. bet one 0="" or="" an="" invalid="" number="" such="" as="" 100),="" then="" an="" appropriate="" error="" message="" should="" be="" output="" to="" the="" user="" using="" the="" alert="" box="" and="" focus="" be="" placed="" in="" the="" textfield="" so="" the="" user="" can="" easily="" correct.="" in="" this="" case,="" the="" bank="" should="" not="" be="" updated="" until="" the="" user="" enters="" a="" valid="" number.="" if="" you="" have="" any="" questions="" regarding="" this,="" please="" ask.="" now="" that="" you="" have="" created="" the="" gui="" for="" the="" slot="" machine,="" this="" phase="" of="" the="" project="" is="" to="" implement="" all="" of="" the="" event="" handlers="" for="" the="" gui="" and="" make="" your="" slotmachinegui="" fully="" functional.="" hint="" #1:="" the="" basics="" for="" each="" event="" handler="" have="" already="" been="" created="" in="" class="" and="" are="" in="" the="" slotmachineemulator.="" for="" slotmachineemulator="" we="" wrote="" methods="" for="" each="" of="" the="" menu="" items.="" each="" of="" these="" methods="" should="" be="" your="" template="" for="" the="" individual="" button="" event="" handlers.="" all="" you="" need="" to="" do="" is="" copy="" each="" of="" these="" methods="" from="" slotmachineemulator="" and="" paste="" them="" in="" your="" gui="" program.="" then="" convert="" all="" to="" event="" handlers="" or="" have="" the="" event="" handler="" for="" each="" button="" call="" these="" methods.="" then="" for="" each="" new="" method="" you="" need="" to="" change="" all="" of="" the="" command/console="" references="" such="" as="" printin="" or="" printf="" to="" be="" control="" references="" instead,="" test="" and="" you="" should="" be="" done.="" hint="" #2:="" use="" alert="" boxes="" to="" display="" error="" messages="" and="" warnings="" messages="" to="" the="" user.="" alert="" boxes="" were="" described="" in="" week="" 6="" javafx="" java="" gui="" tutorial="" -="" 5="" -="" creating="" alert="" boxes="" (10:53="" min.)="" here="" is="" a="" summary="" (not="" everything)="" of="" what="" should="" happen="" for="" each="" button:="" cashout="" if="" there="" is="" a="" balance,="" then="" a="" message="" should="" be="" displayed="" to="" the="" user="" in="" an="" alert="" box="" indicating="" that="" ticket="" is="" printed,="" for="" a="" specific="" dollar="" amount,="" reminder="" to="" cashier.="" the="" slot="" machine="" view="" should="" be="" updated.="" ata="" minimum,="" balance="" should="" be="" 0.="" if="" no="" balance="" remains,="" the="" button="" should="" do="" nothing="" or="" should="" be="" disabled="" (user="" cannot="" press).="" max="" bet="" the="" number="" of="" coins="" bet="" should="" be="" set="" to="" 3.="" if="" remaining="" balance="" cannot="" cover="" bet,="" the="" button="" should="" not="" spin="" tumblers="" or="" the="" button="" should="" be="" disabled="" (user="" cannot="" press).="" if="" remaining="" balance="" can="" cover="" the="" bet,="" then="" the="" tumblers="" should="" spin="" and="" winnings="" should="" be="" computed="" and="" slot="" machine="" view="" should="" be="" updated.="" spin="" if="" remaining="" balance="" cannot="" cover="" bet,="" the="" button="" should="" not="" spin="" tumblers="" or="" the="" button="" should="" be="" disabled="" (user="" cannot="" press).="" if="" remaining="" balance="" can="" cover="" the="" bet,="" then="" the="" tumblers="" should="" spin="" and="" winnings="" should="" be="" computed="" and="" slot="" machine="" view="" should="" be="" updated.="" bet="">
Nov 17, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here