Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package backpack;
- public class Fish
- {
- String typeFish;
- String size;
- String color;
- Fish()
- {
- }
- Fish(String typeFish, String size, String color)
- {
- }
- /**
- * @return the typeFish
- */
- public String getTypeFish() {
- return typeFish;
- }
- /**
- * @param typeFish the typeFish to set
- */
- public void setTypeFish(String typeFish)
- {
- this.typeFish = typeFish;
- }
- /**
- * @return the size
- */
- public String getSize() {
- return size;
- }
- /**
- * @param size the size to set
- */
- public void setSize(String size) {
- this.size = size;
- }
- /**
- * @return the color
- */
- public String getColor() {
- return color;
- }
- /**
- * @param color the color to set
- */
- public void setColor(String color) {
- this.color = color;
- }
- public String toString()
- {
- return "The fish is type: " + typeFish + ", and its size is " + size + ". Lastly, its color is " + color;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement