Re: java programming exam
Hello JamesFlowers14,
I would suggest creating a class diagram to try and figure out everything that you may need. If you don't know what that is check this out:
Class diagram - Wikipedia, the free encyclopedia ....It is Wikipedia, but it does the trick. Just write down the variables you think will be needed and the names of functions you can think of using. From there just flesh things out as best you can.
Re: java programming exam
I am still stuck working on this code, does anyone have a solution they would like to share?
Re: java programming exam
Quote:
Originally Posted by
JamesFlowers14
I am currently in a basic Java Programming Class. This was given to me as a take home lab to count as an exam grade. I'm not asking for you to just give me the answer unless you want to, I just have no idea where to start and would like some guidance, or just help walking through this lab. Thanks here is the question.
Create a new project called <yourlastname>Lab8.
Design a slot machine that takes a nickel to play. Once the nickel is inserted, the player hits enter to start. Three wheels will turn - each wheel has on it the 18 varsity sports at JCU listed below. Then the wheels stop, with one random pick from each wheel. Use JOptionPane techniques for input and output. You can use either one class or separate classes.
Scoring:
Three of a kind = jackpot (all the money in the machine).
Three of the same season = all the money in the machine up to $1.00
Three of the same gender = all the money in the machine up to $0.50
Anything else = you lose.
You must keep track of the amount of money in the machine ($0.00 at the start, adding $0.05 for each play, minus any payouts).
After each spin, ask the player if they want to play again. If yes, take their money and spin again. If not, say goodbye and display the amount of money still in the machine.
Attachment 1603
Come on now. This is a flippin' take home exam -- meaning you need to do this yourself, else you'll be cheating. Locking this question.