HT204088 I bought $10 worth of gems in a game (Eternity warriors 2) and then realized the game crashes ALL the time, i'd like a refund but don't know how.

Like i said i bought some gems and then realized this game has major problems even after there update crashing all the time laggy sometimes wont load it's terrible and i want a refund, please help.

The main problem is that you made the first and second slot machine to pay out 2 quarters after 3 games and the third machine pay out two quarters after two games. That is not what your assignment specified.
SlotMachine firstSlotMachine = new SlotMachine (2,3);
SlotMachine secondSlotMachine = new SlotMachine (2,3);
SlotMachine thirdSlotMachine = new SlotMachine (2,2);
The second problem is that you never add the payout of a machine to Martha's number of quarters.
Look carefully at the way your professor implemented the game() method. If you think about it, what it returns is the net "gain" from playing a game. On jackpot it returns payOut -1 (jackpot less the one quarter Martha had to pay for the game), otherwise it returns -1 (Martha spends one quarter and wins nothing).
So what you can do is simply add the returned value to the number of quarters in the jar -
quarters = <machine>.game();
instead of quarters--.

Similar Messages

Maybe you are looking for