-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDireWolf.java
More file actions
49 lines (42 loc) · 1.13 KB
/
Copy pathDireWolf.java
File metadata and controls
49 lines (42 loc) · 1.13 KB
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
41
42
43
44
45
46
47
48
49
public class DireWolf extends Animal implements Swimming, Running
{
private int strength;
public DireWolf(int strength)
{
super("Ferocious Dire Wolf", "A large beast with the heart of a thousand soldiers");
this.strength = strength;
}
public DireWolf(int strength, String name, String desc)
{
super(name, desc);
this.strength = strength;
}
@Override
public String play()
{
return "The Dire Wolf leaps from mountain to /n" +
"mountain chasing after bees";
}
@Override
public String eat()
{
return "With its mighty paws, it climbs the trees /n" +
"and feasts on the fruit";
}
@Override
public String makeNoise()
{
return "It says Ahhhooooooooohhh " + strength + " times.";
}
@Override
public String swim()
{
return "It trots in the waters and frolics with the seaweed.";
}
@Override
public String run()
{
return "It gallops through the trees with determination \n" +
"at the speed of light.";
}
}