Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package uni.fmi.bachelors;
- public abstract class Animal {
- private String type;
- private int population;
- private String habitat;
- private double height;
- public Animal(String type, int pop) {
- this.type = type;
- population = pop;
- }
- public Animal(String type) {
- this.type = type;
- }
- public abstract void moveTo(String to);
- public abstract void eat();
- public String getType() {
- return type;
- }
- public void setType(String type) {
- this.type = type;
- }
- public int getPopulation() {
- return population;
- }
- public void setPopulation(int population) {
- this.population = population;
- }
- public String getHabitat() {
- return habitat;
- }
- public void setHabitat(String habitat) {
- this.habitat = habitat;
- }
- public double getHeight() {
- return height;
- }
- public void setHeight(double height) {
- this.height = height;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement