Commit af43962c authored by Egita Udodova's avatar Egita Udodova
Browse files

Upload New File

parent 21d31034
public abstract class Animal {
private String name;
private String color;
private int weight;
public Animal(String name, String color, int weight) {
super();
this.name = name;
this.color = color;
this.weight = weight;
}
public Animal() {
// TODO Auto-generated constructor stub
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public abstract void move();
public abstract void speak();
public String display() {
return "Animal [name=" + name + ", color=" + color + ", weight=" + weight + "]";
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment