Skip to content

Instantly share code, notes, and snippets.

@orderr66
Created March 23, 2021 17:25
Show Gist options
  • Save orderr66/781b0e5584770843d5be7ddbd4156fc4 to your computer and use it in GitHub Desktop.
Save orderr66/781b0e5584770843d5be7ddbd4156fc4 to your computer and use it in GitHub Desktop.
public class Owl extends Bird {
private String color;
public Owl(String name, int age, String color) {
super(name, age);
this.color = color;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public void hoot() {
System.out.println("HOOOOOOOT");
}
@Override
public void display() {
System.out.println("Good Night, I am " + this.getName());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment