Monty374

Carnival

Nov 15th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. package carnival;
  2.  
  3. import carnival.Player;
  4. import carnival.GameBooth;
  5. public class Carnival {
  6.  
  7. public static void main(String[] args) {
  8. GameBooth balloonDartToss = new GameBooth(2,"tiger plush", "sticker");
  9. GameBooth ringToss = new GameBooth(2,"bear keychain", "pencil");
  10. GameBooth breakAPlate = new GameBooth(1.5, "pig plush", "plastic dinosaur");
  11. Player shonda = new Player(5);
  12. Player luis = new Player(3);
  13.  
  14. System.out.print("Shonda goes to Balloon Dart Toss. ");
  15. System.out.println(shonda.play(balloonDartToss));
  16.  
  17. System.out.print("Luis goes to Ring Toss. ");
  18. System.out.println(luis.play(ringToss));
  19.  
  20. System.out.print("Shonda goes to Ring Toss. ");
  21. System.out.println(shonda.play(ringToss));
  22.  
  23. System.out.print("Luis goes to Break A Plate. ");
  24. System.out.println(luis.play(breakAPlate));
  25.  
  26. System.out.println("Shonda won: " + shonda.showPrizes());
  27. System.out.println("Luis won: " + luis.showPrizes());
  28.  
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment