Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1.  
  2. /**
  3. * Write a description of class PointNode here.
  4. *
  5. * @author (Liron Mor-Yosef)
  6. * @version (22/06/17)
  7. */
  8. public class PointNode
  9. {
  10. // instance variables
  11. private Point _point;
  12. private PointNode _next;
  13.  
  14. /**
  15. * 1st consturct
  16. */
  17. public PointNode(Point p)
  18. {
  19. _point = new Point(p) ;
  20. _next = null;
  21. }
  22.  
  23. /**
  24. * second construct
  25. */
  26. public PointNode (Point p, PointNode n){
  27. _point = p;
  28. _next = n ;
  29. }
  30.  
  31. /**
  32. *
  33. * copy constructor
  34. */
  35. public PointNode (PointNode p) {
  36. _point = p._point;
  37. _next = p; // הצבעה על P
  38. }
  39.  
  40. /**
  41. *
  42. *
  43. */
  44. public Point getPoint(){
  45. return new Point (_point);
  46. }
  47.  
  48. /**
  49. *
  50. *
  51. *
  52. */
  53. public PointNode getNext(){
  54. return _next;
  55. }
  56.  
  57. /**
  58. *
  59. *
  60. *
  61. */
  62. public void setPoint(Point p) {
  63. _point = p ;
  64. }
  65.  
  66. /**
  67. *
  68. *
  69. */
  70. public void setNext(PointNode next){
  71. _next = next;
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement