ace

calvary1

ace
May 26th, 2010
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1.  
  2. /**
  3. * Write a description of class Calvary here.
  4. *
  5. * @author (your name)
  6. * @version (a version number or a date)
  7. */
  8. public class Calvary
  9. {
  10. // instance variables - replace the example below with your own
  11. int position;
  12.  
  13.  
  14. /**
  15. * Constructor for objects of class Calvary
  16. */
  17. public Calvary()
  18. {
  19. // initialise instance variables
  20. position = this.position;
  21.  
  22. }
  23.  
  24. /**
  25. * An example of a method - replace this comment with your own
  26. *
  27. * @param y a sample parameter for a method
  28. * @return the sum of x and y
  29. */
  30. public void setPosition(int position)
  31. {
  32. this.position = position;
  33. }
  34.  
  35. public int getPosition()
  36. {
  37.  
  38. return position;
  39. }
  40.  
  41. public void move()
  42. {
  43. this.position = getPosition()+3;
  44. }
  45. }
Add Comment
Please, Sign In to add comment