You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
706 B

7 years ago
  1. /* TestSkiJumper.java
  2. * CS207-2 Homework 7 Fall 2018
  3. * This class has main() and tests the implementation of SkiJumper.java.
  4. * Do not make changes to this class.
  5. */
  6. public class TestSkiJumper
  7. {
  8. public static void main( String[] args )
  9. {
  10. // Create a new Ski Jumper
  11. SkiJumper sk1 = new SkiJumper( "John Smith" );
  12. sk1.train(5.2);
  13. sk1.jump();
  14. sk1.train(3.2);
  15. sk1.jump();
  16. sk1.data();
  17. // Create another new Ski Jumper
  18. SkiJumper sk2 = new SkiJumper( "Jenny Adam" );
  19. sk2.train(7.3);
  20. sk2.jump();
  21. sk2.data();
  22. System.out.println(sk2.equals(sk1));
  23. sk2.jump();
  24. System.out.println(sk2.equals(sk1));
  25. }
  26. }