-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMagnificentFrigatebird.java
More file actions
executable file
·63 lines (63 loc) · 1.8 KB
/
Copy pathMagnificentFrigatebird.java
File metadata and controls
executable file
·63 lines (63 loc) · 1.8 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import java.util.List;
import java.util.ArrayList;
/**
* Write a description of class GreaterFrigatebird here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class MagnificentFrigatebird
{
private String appearance;
private List<String> foods;
private List<String> toys;
public MagnificentFrigatebird()
{
appearance = " This is a large black seabird with a bright red throat and sharp beak."
+"\n It looks like it has two tails but it doesn't."
+"\n Kinda looks like a Pterodactyl but very feathery less leathery."
+"\n If you really don't know what it looks like go Google it...";
foods = new ArrayList<String>();
foods.add("a very large herring");
foods.add("several anchovies");
foods.add("Nemo and Dory");
foods.add("some shrimp");
foods.add("a pigeon");
foods.add("the lunch you packed");
toys= new ArrayList<String>();
toys.add("pigeon");
toys.add("seagull");
toys.add("parrot");
toys.add("dragon");
toys.add("Duck");
toys.add("pegsus");
toys.add("Doge");
toys.add("shark");
}
public String roar()
{
return "Screeeeeeeeeeeeeeeee";
}
public String sleep()
{
return "ZzzzzZzzzZzzz";
}
public String play()
{
String playing ="";
for(String toy: toys)
{
playing +="The Magnificent Frigatebird was bored so he chased a " + toys + "until it got tired.";
}
return playing;
}
public String eat()
{
String eating = "";
for(String food: foods)
{
eating += "The Magnificent Frigatebird swoops down out of the sky and eats "+ food +"!\n";
}
return eating;
}
}