Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1.  
  2. package umlaassignment1;
  3.  
  4. public class Flag {
  5. private int height;
  6. private int weight;
  7. private String colour;
  8.  
  9. public int getHeight() {
  10. return height;
  11. }
  12.  
  13. public void setHeight(int height) {
  14. this.height = height;
  15. }
  16.  
  17. public int getWeight() {
  18. return weight;
  19. }
  20.  
  21. public void setWeight(int weight) {
  22. this.weight = weight;
  23. }
  24.  
  25. public String getColour() {
  26. return colour;
  27. }
  28.  
  29. public void setColour(String colour) {
  30. this.colour = colour;
  31. }
  32. public void setData(int height,int weight,String colour)
  33. {
  34. this.height=height;
  35. this.colour=colour;
  36. this.weight=weight;
  37. }
  38. public void display()
  39. {
  40. System.out.println(" "+height);
  41. System.out.println(" "+weight);
  42. System.out.println(" "+colour);
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement