Advertisement
GameNCode

JumperMain

Dec 7th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. /**
  2. * Created by roywe on 12/7/2016.
  3. */
  4.  
  5. import java.util.*;
  6.  
  7. public class Jumper {
  8. public static void main(String []args)
  9. {
  10. Scanner UI = new Scanner(System.in);
  11. System.out.println("Enter your ID");
  12. Jumper Roy = new Jumper(UI.nextString());
  13. System.out.println("Enter how many times you've jumped");
  14. int Jumps = UI.nextInt();
  15.  
  16. for(int i = 0; i <= Jumps; i++)
  17. {
  18. System.out.println("Enter jump height");
  19. Roy.setJump1(UI.nextInt());
  20. if(Roy.getJump1() > Roy.getRecord())
  21. {
  22. Roy.setRecord(Roy.getJump1());
  23. }
  24. Roy.setJump2(Roy.getJump1());
  25. Roy.setJump3(Roy.getJump2());
  26. }
  27. if(Roy.getRecord == Roy.getJump1 || Roy.getRecord == Roy.getJump2 || Roy.getRecord == Roy.getJump3)
  28. {
  29. System.out.println("Ready for competition");
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement