Created
March 23, 2021 17:25
-
-
Save orderr66/781b0e5584770843d5be7ddbd4156fc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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