-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathLynx.java
40 lines (33 loc) · 913 Bytes
/
Lynx.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* Write a description of class Lynx here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Lynx extends Animal implements Roamable
{
public Lynx(String inputDescription, String inputName)
{
super(inputDescription, inputName);
}
public String move()
{
return "The lynx walks around its cage, hiding in the grass, like the lynx do.";
}
public String makeNoise()
{
return "The lynx purrs quietly, like the lynx do.";
}
public String eat()
{
return "The lynx hunts down a mouse in its cage and eats it, like the lynx do.";
}
public String play()
{
return "The lynx walks over and playfully pokes its friend, like the lynx do.";
}
public String roam()
{
return "The lynx roams around, stalking its prey, like the lynx do.";
}
}