![]() Write the code required to answer questions such as the following:ġ) Will you always lose money with 25 cent pulls? 50 cent? 75 cent? The first part of your assignment is to create a Java program that runs an analysis of the slot machine. You will have an array that will store how many times you have the following winnings: ![]() Use this to start your programming assignment. I have also added a file called Assignment7.java that "plays around" with the slot machine code. The return is the dollar amount of the winnings. The method parameter is the number of quarters you put into the machine (1-3). *** * *double winnings = johnnysOneArmBandit.pull(1) Then you use the following to pull the lever: * * * *SlotMachine johnnysOneArmBandit = new SlotMachine() Then you have to include the following line to create the SlotMachine: To use the SlotMachine I've created, simply put the SlotMachine.class file in the same folder as your java source/class files that you create. Your assignment is to create a report on the payout of the slot machine. This is the directions I have been given.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |