-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSkunk.java
More file actions
46 lines (39 loc) · 919 Bytes
/
Copy pathSkunk.java
File metadata and controls
46 lines (39 loc) · 919 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
public class Skunk extends Animal implements Swimming, Running
{
private int smellyness;
public Skunk(int smellyness)
{
super("Skunk", "Looked at a threatening human being");
this.smellyness = smellyness;
}
public Skunk(int smellyness, String name, String desc)
{
super(name, desc);
this.smellyness = smellyness;
}
@Override
public String play()
{
return "It jumps into the bush";
}
@Override
public String eat()
{
return "It eats an insect";
}
@Override
public String makeNoise()
{
return "It screams from its butt with gas" + smellyness + " times.";
}
@Override
public String swim()
{
return "It bathes in a bath of tomato sauce";
}
@Override
public String run()
{
return "It's a fart and run!";
}
}