0% found this document useful (0 votes)
3 views

Bird

Uploaded by

Haikdo
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Bird

Uploaded by

Haikdo
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

public class Birds extends animal {

private String FeatherColor;

Birds(String Name, String eyeColor, double height, double weight, double


lenght, int noofLegs,
String FeatherColor) {
super(Name, eyeColor, height, weight, lenght, noofLegs);
this.FeatherColor = FeatherColor;
}

Birds() {

void setFeatherColor(String FeatherColor) {


this.FeatherColor = FeatherColor;
}

String getFeatherColor() {
return FeatherColor;
}

void AnimalDetails() {
System.out.println("<<< THE DOG DETAILS >>>");
System.out.println(Name + " is a Bird having " + eyeColor + " eyes. Its
height is " + height
+ " inches, and a length of " +
lenght + " inches. It weight " + weight + " grams, with " +
noofLegs + " legs and " + FeatherColor
+ " fur color ");
System.out.println();
}

void makeSound() {
System.out.println("The bird is chirping Tweet. Tweet. Tweet");
}

void eatFood() {
System.out.println("The bird eats seeds or ripe fruits");
}

void Drink() {
System.out.println("The bird needs to drink at most 1 liter of water a
day");
}
}

You might also like