Commit 160d1afb authored by charlotte.kerr's avatar charlotte.kerr

Upload New File

parent fd5024b1
public abstract class Animal {
// Member variables:
String name;
String diet;
String habitat;
String description;
String classification;
// Class methods:
public void displayInfo() { // Displays the animal's details
System.out.println("This animal's name is: " + this.name + ". " + this.description
+ ". It lives in the " + this.habitat + " and typically eats "
+ this.diet + ".");
}
}
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