Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by roywe on 12/7/2016.
- */
- import java.util.*;
- public class Jumper {
- public static void main(String []args)
- {
- Scanner UI = new Scanner(System.in);
- System.out.println("Enter your ID");
- Jumper Roy = new Jumper(UI.nextString());
- System.out.println("Enter how many times you've jumped");
- int Jumps = UI.nextInt();
- for(int i = 0; i <= Jumps; i++)
- {
- System.out.println("Enter jump height");
- Roy.setJump1(UI.nextInt());
- if(Roy.getJump1() > Roy.getRecord())
- {
- Roy.setRecord(Roy.getJump1());
- }
- Roy.setJump2(Roy.getJump1());
- Roy.setJump3(Roy.getJump2());
- }
- if(Roy.getRecord == Roy.getJump1 || Roy.getRecord == Roy.getJump2 || Roy.getRecord == Roy.getJump3)
- {
- System.out.println("Ready for competition");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement