Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. package backpack;
  2.  
  3. public class Fish
  4. {
  5. String typeFish;
  6. String size;
  7. String color;
  8.  
  9.  
  10. Fish()
  11. {
  12.  
  13. }
  14.  
  15. Fish(String typeFish, String size, String color)
  16. {
  17.  
  18.  
  19. }
  20.  
  21.  
  22.  
  23. /**
  24. * @return the typeFish
  25. */
  26. public String getTypeFish() {
  27. return typeFish;
  28. }
  29. /**
  30. * @param typeFish the typeFish to set
  31. */
  32. public void setTypeFish(String typeFish)
  33. {
  34. this.typeFish = typeFish;
  35. }
  36. /**
  37. * @return the size
  38. */
  39. public String getSize() {
  40. return size;
  41. }
  42. /**
  43. * @param size the size to set
  44. */
  45. public void setSize(String size) {
  46. this.size = size;
  47. }
  48. /**
  49. * @return the color
  50. */
  51. public String getColor() {
  52. return color;
  53. }
  54. /**
  55. * @param color the color to set
  56. */
  57. public void setColor(String color) {
  58. this.color = color;
  59. }
  60.  
  61.  
  62.  
  63. public String toString()
  64. {
  65.  
  66. return "The fish is type: " + typeFish + ", and its size is " + size + ". Lastly, its color is " + color;
  67. }
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement