-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOctopus.java
More file actions
34 lines (33 loc) · 856 Bytes
/
Copy pathOctopus.java
File metadata and controls
34 lines (33 loc) · 856 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
public class Octopus extends Animal implements Swimming
{
public Octopus()
{
super("Octopus", "One of the smartest animals in the world \n"+
"which will rise from the sea and overthrow democracy");
}
public Octopus(String name, String desc)
{
super(name, desc);
}
@Override
public String play()
{
return "The octopus plays with the dead carcasses of it's last meal, \n" +
"then solves a rubiks cube.";
}
@Override
public String eat()
{
return "The octopus eats a crab, then scoffs at you.";
}
@Override
public String makeNoise()
{
return "The octopus whispers its plan to inevitably take over the world";
}
@Override
public String swim()
{
return "It swims at 25 miles per hour. ";
}
}