-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPangolin.java
More file actions
35 lines (35 loc) · 948 Bytes
/
Copy pathPangolin.java
File metadata and controls
35 lines (35 loc) · 948 Bytes
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
public class Pangolin extends Animal implements Running
{
private int elasticity;
public Pangolin(int elasticity)
{
super("Pangolin", "A living pine cone");
this.elasticity = elasticity;
}
public Pangolin(String name, String description)
{
super("Pangolin", "A living pine cone");
}
@Override
public String play()
{
return "The Pangolin waddles over to you, rolls into a ball, + \n" +
"and falls asleep in your lap.";
}
@Override
public String makeNoise()
{
return "The Pangolin lets out a high pitched squeal and runs around in \n" +
"circles.";
}
@Override
public String eat()
{
return "The Pangolin pulls a bowl of ramen out of nowhere and slurps it \n" + "happily.";
}
@Override
public String run()
{
return "The Pangolin spreads its wings and stands there.";
}
}