-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoat.java
More file actions
47 lines (39 loc) · 735 Bytes
/
Copy pathGoat.java
File metadata and controls
47 lines (39 loc) · 735 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
36
37
38
39
40
41
42
43
44
45
46
47
public class Goat extends Animal implements Swimming, Running
{
private int greatness;
public Goat(int greatness)
{
super("Goat", "Greatest of all time.");
this.greatness = greatness;
}
public Goat(int greatness, String name, String desc)
{
super(name, desc);
this.greatness = greatness;
}
@Override
public String play()
{
return "The goat breaks everyone's ankles.";
}
@Override
public String makeNoise()
{
return "YOU CAN'T GUARD ME!";
}
@Override
public String eat()
{
return "The goat devours his steak";
}
@Override
public String swim()
{
return "The goat swims to train.";
}
@Override
public String run()
{
return "The goat runs up and down the court.";
}
}