/*
Chapter 10:
The Robin Class
Programmer:
Brad Shedd
Date:
May 3, 2004
Program Name: Robin.java
Purpose:
To provide an abstract base class that inherits bird class
*/
public
class
Robin
extends Bird
{
private
String name;
public
Robin(String aName)
{
super("Robin");
name =
aName;
}
public
void describe()
{
System.out.println(name +
", a breed of "+type+"
called " + breed);
}
public
void sound()
{
System.out.println("Tweet
Tweet!");
}
public
void sleep()
{
System.out.println(name+"
the "+breed+" sleeps
with one eye open for the cat!");
}
public
String getName()
{
return
name;
}
}