Guest User

Untitled

a guest
Dec 9th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public class Speed {
  2. private int length = 0;
  3. public int getSpeed () { return length; }
  4. public void setSpeed (int i) {
  5. if (i > 0) {
  6. length = i;
  7. }
  8. }
  9. }
  10. public class MoreSpeed extends Speed {
  11. private int length;
  12. public int incSpeed() {
  13. return length+1;
  14.  
  15. }}
Add Comment
Please, Sign In to add comment