Commit 8fec08e3 authored by harry.sawdon's avatar harry.sawdon

First commit

parents
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>InheritanceTest</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=15
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=15
package inheritanceTest;
public class Animal {
protected String name;
protected String enviro;
protected String eats;
protected String noOfLegs;
protected String wings;
protected String Length;
protected String Description;
public Animal(){}
public Animal(String Name, String habitat, String food, String legs, String wingspan, String length, String description){
this.name = Name;
this.enviro = habitat;
this.eats = food;
this.noOfLegs = legs;
this.wings= wingspan;
this.Length= length;
this.Description = description;
}
public String getName() {
return name;
}
public void setName(String Name) {
this.name = Name;
}
public String getEats() {
return eats;
}
public void setEats(String eats) {
this.eats = eats;
}
public String getNoOfLegs() {
return noOfLegs;
}
public void setNoOfLegs(String noOfLegs) {
this.noOfLegs = noOfLegs;
}
public String getHabitat() {
return enviro;
}
public void setHabitat(String habitat) {
this.enviro = habitat;
}
public String getwingspan(String wingspan) {
return wings;
}
public void setwingspan(String wingspan) {
this.wings = wingspan;
}
public String getlength(String wingspan) {
return Length;
}
public void setlength(String length) {
this.Length = length;
}
public String getDesc(String description) {
return Description;
}
public void setDesc(String description) {
this.Description = description;
}
}
\ No newline at end of file
package inheritanceTest;
public class Bird extends Animal{
public Bird(String Name, String habitat, String food, String legs, String wingspan, String length, String Description) {
super(Name, habitat, food, legs, wingspan, length, Description);
}
@Override
public String toString() {
return name + enviro + eats + noOfLegs + wings + Length + Description;
}
}
package inheritanceTest;
public class Fish extends Animal{
public Fish(String Name, String habitat, String food, String legs, String wingspan, String length, String Description) {
super(Name, habitat, food, legs, wingspan, length, Description);
}
@Override
public String toString() {
return name + enviro + eats + noOfLegs + wings + Length + Description;
}
}
package inheritanceTest;
public class Mammal extends Animal{
public Mammal(String Name, String habitat, String food, String legs, String wings, String length, String Description) {
super(Name, habitat, food, legs, wings, length, Description);
}
@Override
public String toString() {
return name + enviro + eats + noOfLegs + wings + Length + Description;
}
}
package inheritanceTest;
public class Reptile extends Animal{
public Reptile(String Name, String habitat, String food, String legs, String wingspan, String length, String Description) {
super(Name, habitat, food, legs, wingspan, length, Description);
}
@Override
public String toString() {
return name + enviro + eats + noOfLegs + wings + Length + Description;
}
}
package inheritanceTest;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
public class Test {
public static void animals() {
ArrayList<Animal> Animals = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Animals.add(PBear);Animals.add(Seal);Animals.add(Camel);Animals.add(Coyote);Animals.add(Jaguar);Animals.add(Capybara);Animals.add(Deer);Animals.add(Raccoon);
Animals.add(Penguin);Animals.add(SnowOwl);Animals.add(Vulture);Animals.add(Falcon);Animals.add(Parrot);Animals.add(Toucan);Animals.add(Owl);Animals.add(Woodpecker);
Animals.add(crab);Animals.add(Snailfish);Animals.add(Eel);Animals.add(Bullshark);Animals.add(Salmon);Animals.add(carp);
Animals.add(Tortoise);Animals.add(BDragon);Animals.add(Crocodile);Animals.add(Python);Animals.add(Lizard);Animals.add(Chameleon);
for (int i = 0; i<Animals.size(); i++) {
System.out.println(Animals.get(i));
}
}
public static void animalsrand() {
ArrayList<Animal> Animals = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Animals.add(PBear);Animals.add(Seal);Animals.add(Camel);Animals.add(Coyote);Animals.add(Jaguar);Animals.add(Capybara);Animals.add(Deer);Animals.add(Raccoon);
Animals.add(Penguin);Animals.add(SnowOwl);Animals.add(Vulture);Animals.add(Falcon);Animals.add(Parrot);Animals.add(Toucan);Animals.add(Owl);Animals.add(Woodpecker);
Animals.add(crab);Animals.add(Snailfish);Animals.add(Eel);Animals.add(Bullshark);Animals.add(Salmon);Animals.add(carp);
Animals.add(Tortoise);Animals.add(BDragon);Animals.add(Crocodile);Animals.add(Python);Animals.add(Lizard);Animals.add(Chameleon);
Random rand = new Random();
int upperbound = 28;
int pick = rand.nextInt(upperbound);
System.out.print(Animals.get(pick));
}
public static void Mammals(){
ArrayList<Animal> Mammals = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Mammals.add(PBear);
Mammals.add(Seal);
Mammals.add(Camel);
Mammals.add(Coyote);
Mammals.add(Jaguar);
Mammals.add(Capybara);
Mammals.add(Deer);
Mammals.add(Raccoon);
for (int i = 0; i<Mammals.size(); i++) {
System.out.println(Mammals.get(i));
}
}
public static void birds() {
ArrayList<Animal> Bird = new ArrayList<Animal>();
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Bird.add(Penguin);
Bird.add(SnowOwl);
Bird.add(Vulture);
Bird.add(Falcon);
Bird.add(Parrot);
Bird.add(Toucan);
Bird.add(Owl);
Bird.add(Woodpecker);
for (int i = 0; i<Bird.size(); i++) {
System.out.println(Bird.get(i));
}
}
public static void fish() {
ArrayList<Animal> Fishes = new ArrayList<Animal>();
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Fishes.add(crab);
Fishes.add(Snailfish);
Fishes.add(Eel);
Fishes.add(Bullshark);
Fishes.add(Salmon);
Fishes.add(carp);
for (int i = 0; i<Fishes.size(); i++) {
System.out.println(Fishes.get(i));
}
}
public static void reptiles() {
ArrayList<Animal> Reptiles = new ArrayList<Animal>();
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Reptiles.add(Tortoise);
Reptiles.add(BDragon);
Reptiles.add(Crocodile);
Reptiles.add(Python);
Reptiles.add(Lizard);
Reptiles.add(Chameleon);
for (int i = 0; i<Reptiles.size(); i++) {
System.out.println(Reptiles.get(i));
}
}
public static void desert() {
ArrayList<Animal> Desert = new ArrayList<Animal>();
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Desert.add(Camel);
Desert.add(Coyote);
Desert.add(Vulture);
Desert.add(Falcon);
Desert.add(Tortoise);
Desert.add(BDragon);
for (int i = 0; i<Desert.size(); i++) {
System.out.println(Desert.get(i));
}
}
public static void arctic() {
ArrayList<Animal> Arctic = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Arctic.add(PBear);
Arctic.add(Seal);
Arctic.add(Snailfish);
Arctic.add(Penguin);
Arctic.add(SnowOwl);
for (int i = 0; i<Arctic.size(); i++) {
System.out.println(Arctic.get(i));
}
}
public static void jungle() {
ArrayList<Animal> Jungle = new ArrayList<Animal>();
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Jungle.add(Jaguar);
Jungle.add(Capybara);
Jungle.add(Parrot);
Jungle.add(Toucan);
Jungle.add(Python);
Jungle.add(Chameleon);
for (int i = 0; i<Jungle.size(); i++) {
System.out.println(Jungle.get(i));
}
}
public static void forestry() {
ArrayList<Animal> Forestry = new ArrayList<Animal>();
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Forestry.add(Deer);
Forestry.add(Raccoon);
Forestry.add(Owl);
Forestry.add(Woodpecker);
for (int i = 0; i<Forestry.size(); i++) {
System.out.println(Forestry.get(i));
}
}
public static void allenviro() {
ArrayList<Animal> AllHabs = new ArrayList<Animal>();
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
AllHabs.add(Lizard);
AllHabs.add(crab);
AllHabs.add(Eel);
AllHabs.add(Bullshark);
AllHabs.add(Salmon);
AllHabs.add(carp);
for (int i = 0; i<AllHabs.size(); i++) {
System.out.println(AllHabs.get(i));
}
}
public static void carnivore() {
ArrayList<Animal> Carnivores = new ArrayList<Animal>();
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Carnivores.add(Snailfish);
Carnivores.add(Eel);
Carnivores.add(Bullshark);
Carnivores.add(Salmon);
Carnivores.add(Crocodile);
Carnivores.add(Python);
Carnivores.add(Penguin);
Carnivores.add(SnowOwl);
Carnivores.add(Falcon);
Carnivores.add(PBear);
Carnivores.add(Coyote);
Carnivores.add(Seal);
Carnivores.add(Jaguar);
Carnivores.add(Raccoon);
for (int i = 0; i<Carnivores.size(); i++) {
System.out.println(Carnivores.get(i));
}
}
public static void herbivore() {
ArrayList<Animal> Herbivores = new ArrayList<Animal>();
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Herbivores.add(Tortoise);
Herbivores.add(BDragon);
Herbivores.add(Camel);
Herbivores.add(Deer);
for (int i = 0; i<Herbivores.size(); i++) {
System.out.println(Herbivores.get(i));
}
}
public static void otherdiet() {
ArrayList<Animal> Otherdiets = new ArrayList<Animal>();
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Otherdiets.add(Lizard);
Otherdiets.add(Chameleon);
Otherdiets.add(carp);
Otherdiets.add(crab);
Otherdiets.add(Vulture);
Otherdiets.add(Parrot);
Otherdiets.add(Toucan);
Otherdiets.add(Owl);
Otherdiets.add(Woodpecker);
Otherdiets.add(Raccoon);
for (int i = 0; i<Otherdiets.size(); i++) {
System.out.println(Otherdiets.get(i));
}
}
public static void main (String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Welcome to YSJ Zoo! Please select an option to get started.\n\n");
System.out.println("1\t Show all of our animals");
System.out.println("2\t Choose a random animal and show their details");
System.out.println("3\t Show our Mammals");
System.out.println("4\t Show our Birds");
System.out.println("5\t Show our Fish");
System.out.println("6\t Show our Reptiles");
System.out.println("7\t Show our desert animals");
System.out.println("8\t Show our arctic/antarctic animals");
System.out.println("9\t Show our jungle/rainforest animals");
System.out.println("10\t Show our forestry/woodland animals");
System.out.println("11\t Show our animals from all environments");
System.out.println("12\t Show our carnivores");
System.out.println("13\t Show our herbivores");
System.out.println("14\t Show our animals with other diets\n");
System.out.println("Please enter your choice:");
int choice=in.nextInt();
switch (choice) {
case 1:
animals();
break;
case 2:
animalsrand();
break;
case 3:
Mammals();
break;
case 4:
birds();
break;
case 5:
fish();
break;
case 6:
reptiles();
break;
case 7:
desert();
break;
case 8:
arctic();
break;
case 9:
jungle();
break;
case 10:
forestry();
break;
case 11:
allenviro();
break;
case 12:
carnivore();
break;
case 13:
herbivore();
break;
case 14:
otherdiet();
break;
default:
System.out.print("Invalid selection, please reload and try again");
}
in.close();
}
}
package inheritanceTest;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
public class test1 {
public static void animals() {
ArrayList<Animal> Animals = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Animals.add(PBear);Animals.add(Seal);Animals.add(Camel);Animals.add(Coyote);Animals.add(Jaguar);Animals.add(Capybara);Animals.add(Deer);Animals.add(Raccoon);
Animals.add(Penguin);Animals.add(SnowOwl);Animals.add(Vulture);Animals.add(Falcon);Animals.add(Parrot);Animals.add(Toucan);Animals.add(Owl);Animals.add(Woodpecker);
Animals.add(crab);Animals.add(Snailfish);Animals.add(Eel);Animals.add(Bullshark);Animals.add(Salmon);Animals.add(carp);
Animals.add(Tortoise);Animals.add(BDragon);Animals.add(Crocodile);Animals.add(Python);Animals.add(Lizard);Animals.add(Chameleon);
for (int i = 0; i<Animals.size(); i++) {
System.out.println(Animals.get(i));
}
}
public static void animalsrand() {
ArrayList<Animal> Animals = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Animals.add(PBear);Animals.add(Seal);Animals.add(Camel);Animals.add(Coyote);Animals.add(Jaguar);Animals.add(Capybara);Animals.add(Deer);Animals.add(Raccoon);
Animals.add(Penguin);Animals.add(SnowOwl);Animals.add(Vulture);Animals.add(Falcon);Animals.add(Parrot);Animals.add(Toucan);Animals.add(Owl);Animals.add(Woodpecker);
Animals.add(crab);Animals.add(Snailfish);Animals.add(Eel);Animals.add(Bullshark);Animals.add(Salmon);Animals.add(carp);
Animals.add(Tortoise);Animals.add(BDragon);Animals.add(Crocodile);Animals.add(Python);Animals.add(Lizard);Animals.add(Chameleon);
Random rand = new Random();
int upperbound = 28;
int pick = rand.nextInt(upperbound);
System.out.print(Animals.get(pick));
}
public static void Mammals(){
ArrayList<Animal> Mammals = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Mammals.add(PBear);
Mammals.add(Seal);
Mammals.add(Camel);
Mammals.add(Coyote);
Mammals.add(Jaguar);
Mammals.add(Capybara);
Mammals.add(Deer);
Mammals.add(Raccoon);
for (int i = 0; i<Mammals.size(); i++) {
System.out.println(Mammals.get(i));
}
}
public static void birds() {
ArrayList<Animal> Bird = new ArrayList<Animal>();
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Bird.add(Penguin);
Bird.add(SnowOwl);
Bird.add(Vulture);
Bird.add(Falcon);
Bird.add(Parrot);
Bird.add(Toucan);
Bird.add(Owl);
Bird.add(Woodpecker);
for (int i = 0; i<Bird.size(); i++) {
System.out.println(Bird.get(i));
}
}
public static void fish() {
ArrayList<Animal> Fishes = new ArrayList<Animal>();
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Fishes.add(crab);
Fishes.add(Snailfish);
Fishes.add(Eel);
Fishes.add(Bullshark);
Fishes.add(Salmon);
Fishes.add(carp);
for (int i = 0; i<Fishes.size(); i++) {
System.out.println(Fishes.get(i));
}
}
public static void reptiles() {
ArrayList<Animal> Reptiles = new ArrayList<Animal>();
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Reptiles.add(Tortoise);
Reptiles.add(BDragon);
Reptiles.add(Crocodile);
Reptiles.add(Python);
Reptiles.add(Lizard);
Reptiles.add(Chameleon);
for (int i = 0; i<Reptiles.size(); i++) {
System.out.println(Reptiles.get(i));
}
}
public static void desert() {
ArrayList<Animal> Desert = new ArrayList<Animal>();
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Desert.add(Camel);
Desert.add(Coyote);
Desert.add(Vulture);
Desert.add(Falcon);
Desert.add(Tortoise);
Desert.add(BDragon);
for (int i = 0; i<Desert.size(); i++) {
System.out.println(Desert.get(i));
}
}
public static void arctic() {
ArrayList<Animal> Arctic = new ArrayList<Animal>();
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Arctic.add(PBear);
Arctic.add(Seal);
Arctic.add(Snailfish);
Arctic.add(Penguin);
Arctic.add(SnowOwl);
for (int i = 0; i<Arctic.size(); i++) {
System.out.println(Arctic.get(i));
}
}
public static void jungle() {
ArrayList<Animal> Jungle = new ArrayList<Animal>();
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Capybara = new Mammal("Name: Capybara\n", "Habitat: Swamp/Grass\n", "Eats: Grass\n", "4 Legs\n", "Capybara are medium sized mammals that live in swampy and grassy areas.\nThey feed on grass primarily.\n", "", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Jungle.add(Jaguar);
Jungle.add(Capybara);
Jungle.add(Parrot);
Jungle.add(Toucan);
Jungle.add(Python);
Jungle.add(Chameleon);
for (int i = 0; i<Jungle.size(); i++) {
System.out.println(Jungle.get(i));
}
}
public static void forestry() {
ArrayList<Animal> Forestry = new ArrayList<Animal>();
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Forestry.add(Deer);
Forestry.add(Raccoon);
Forestry.add(Owl);
Forestry.add(Woodpecker);
for (int i = 0; i<Forestry.size(); i++) {
System.out.println(Forestry.get(i));
}
}
public static void allenviro() {
ArrayList<Animal> AllHabs = new ArrayList<Animal>();
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
AllHabs.add(Lizard);
AllHabs.add(crab);
AllHabs.add(Eel);
AllHabs.add(Bullshark);
AllHabs.add(Salmon);
AllHabs.add(carp);
for (int i = 0; i<AllHabs.size(); i++) {
System.out.println(AllHabs.get(i));
}
}
public static void carnivore() {
ArrayList<Animal> Carnivores = new ArrayList<Animal>();
Fish Snailfish = new Fish("Name: Snailfish\n", "Habitat: Cold Water\n", "Eats: Crustaceans\n", "Length: 30cm\n", "Snailfish are cold water fish that are often found in\ncolder climates. they feed on crustaceans.\n", "", "");
Fish Eel = new Fish("Name: Eel\n", "Habitat: All Environments, Bottom Dwellers\n", "Eats: Small fish\n", "Length: 70cm\n", "Eels are bottom dweller fish found in all environments.\nThey feed on small fish and plants\n", "", "");
Fish Bullshark = new Fish("Name: Bull Shark\n", "Habitat: Warm, shallow water\n", "Eats: All sealife\n", "Length: 11 feet\n", "Bull Shark are predators typically found in warm, shallow water\nand feed on all types of sealife from small to larger fish and other sharks.\n", "", "");
Fish Salmon = new Fish("Name: Salmon\n", "Habitat: Clear rivers\n", "Eats: Invertebrates/Small fish\n", "Length: Up to 30in\n", "Salmon are common fish found in clearwater rivers.\nThey feed on invertebrates and small fish also found in their habitat\n", "", "");
Reptile Crocodile = new Reptile("Name: Crocodile\n", "Habitat: Jungle/Swamps\n", "Eats: Small Animals\n", "4 Legs\n", "Crocodiles, related to alligators are jungle/swamp\ndwellers that feed on small to medium mammals.\n", "", "");
Reptile Python = new Reptile("Name: Python\n", "Habitat: Jungle/Swamps\n", "Eats: Small/Medium Mammals\n", "0 Legs\n", "Pythoins are a type of snake found in the jungle/swamp environments.\nThey feed on small to medium mammals local to their habitat.\n", "", "");
Bird Penguin = new Bird("Name: Penguin\n", "Habitat: Antarctic\n","Eats: Sealife\n","2 Legs\n", "Wingspan: 30in\n", "Penguins are large Antarctic birds that come in many forms.\nThey feed on fish in their envornment.\n", "");
Bird SnowOwl = new Bird("Name: Snow Owl\n", "Habitat: Arctic\n", "Eats: Lemmings/Small Animals\n", "2 Legs\n", "Wingspan: 165cm\n", "Snow Owls are small owls that live in the arctic\nThey feed on lemmings and small rodents.\n", "");
Bird Falcon = new Bird("Name: Falcon\n", "Habitat: Desert\n", "Eats: Small Birds/Fish\n", "2 Legs\n", "Wingspan: 120cm\n", "Falcons are large birds of prey that come in many forms.\nThey feed on small birds and fish and can be found\nin many environments.\n", "");
Mammal PBear = new Mammal("Name: Polar Bear\n","Habitat: Arctic\n","Eats: Seals\n","4 Legs\n", "Polar Bears are large white bears that live in the Arctic.\nThey are carnivores and often search in the water for seals to hunt.\n", " ", "");
Mammal Seal = new Mammal("Name: Seal\n", "Habitat: Arctic\n", "Eats: Fish\n", "2 Legs\n", "Seals are large aquatic mammals that live in the arctic and antarctic\nThey live in the sea primarily and often hunt schools of fish.\n", "", "");
Mammal Coyote = new Mammal("Name: Coyote\n", "Habitat: Desert\n", "Eats: Animals/Fruit\n", "4 Legs\n", "Coyotes are desert and plain animals that are typically feral.\nThey feed on other animals and fruit.\n", "", "");
Mammal Jaguar = new Mammal("Name: Jaguar\n", "Habitat: Jungle/Rainforest\n", "Eats: Deer/Capybara\n", "4 Legs\n", "Jaguars are big cat predators that live in\njungle and rainforest environments.\n They feed on deer and capybara local to the environent.\n", "", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Carnivores.add(Snailfish);
Carnivores.add(Eel);
Carnivores.add(Bullshark);
Carnivores.add(Salmon);
Carnivores.add(Crocodile);
Carnivores.add(Python);
Carnivores.add(Penguin);
Carnivores.add(SnowOwl);
Carnivores.add(Falcon);
Carnivores.add(PBear);
Carnivores.add(Coyote);
Carnivores.add(Seal);
Carnivores.add(Jaguar);
Carnivores.add(Raccoon);
for (int i = 0; i<Carnivores.size(); i++) {
System.out.println(Carnivores.get(i));
}
}
public static void herbivore() {
ArrayList<Animal> Herbivores = new ArrayList<Animal>();
Reptile Tortoise = new Reptile("Name: Tortoise\n", "Habitat: Deserts\n", "Eats: Plants/Vegetation\n", "4 Legs\n", "Tortoises are large, shelled reptiles that live a long time.\nThey feed on desert plants and vegatation.\n", "", "");
Reptile BDragon = new Reptile("Name: Bearded Dragon\n", "Habitat: Deserts\n", "Eats: Plants/Insects\n", "4 Legs\n", "Bearded Dragons are medium sized, lizard type reptiles.\nThey feed on plants and insects in the desert environment.\n", "", "");
Mammal Camel = new Mammal("Name: Camel\n", "Habitat: Desert\n", "Eats: Plants\n", "4 Legs\n", "Camels are desert mammals that exist in worldwide deserts.\nThey eat dry vegetation and plants in the environment.\n", "", "");
Mammal Deer = new Mammal("Name: Deer\n", "Habitat: Forestry, ", "Eats: Plants\n", "4 Legs\n", "Deer are worldwide animals that live in forest environments.\nThey are herbivores and thus feed on vegetation.\n", "", "");
Herbivores.add(Tortoise);
Herbivores.add(BDragon);
Herbivores.add(Camel);
Herbivores.add(Deer);
for (int i = 0; i<Herbivores.size(); i++) {
System.out.println(Herbivores.get(i));
}
}
public static void otherdiet() {
ArrayList<Animal> Otherdiets = new ArrayList<Animal>();
Reptile Lizard = new Reptile("Name: Common Lizard\n", "Habitat: All Habitats\n", "Eats: Insects\n", "4 Legs\n", "The common lizard can be found in many environments worldwide.\nThey feed on small insects from all environments.\n", "", "");
Reptile Chameleon = new Reptile("Name: Chameleon\n", "Habitat: Rainforests\n", "Eats: Insects\n", "4 Legs\n", "Chameleons are known for their camouflage ability and are\nfound in rainforests. They feed on exotic bugs.\n", "", "");
Fish carp = new Fish("Name: Carp\n", "Habitat: Lakes, Rivers\n", "Eats: Dead fish/Crustaceans\n", "Length: 60cm\n", "Carp are common fish that are found in lakes andrivers.\nThey feed mainly on dead fish and crustaceans.\n", "", "");
Fish crab = new Fish("Name: Crab\n", "Habitat: All Environments\n", "Eats: Carcasses/Plants\n", "10 Legs\n", "Length: Between 10cm - 2m\n", "Crabs are all-environment crustaceans that scavenge\nfor fish carcasses and plants in their environment\n", "");
Bird Vulture = new Bird("Name: Vulture\n", "Habitat: Desert\n", "Eats: Carcasses\n", "2 Legs\n", "Wingspan: 2.2m\n", "Vultures are large desert scavengers that feed\non dead animals due to their inability to hunt.\n", "");
Bird Parrot = new Bird("Name: Parrot\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects\n", "2 Legs\n", "Wingspan: 4ft\n", "Parrots are exotic birds that are\ntypically found in rainforest environments.\nThey feed on plants and insects.\n", "");
Bird Toucan = new Bird("Name: Toucan\n", "Habitat: Jungle/Rainforest\n", "Eats: Plants/Insects/Rodents\n", "2 Legs\n", "Wingspan: 52in\n", "Toucans are exotic birds that live in the rainforest.\nThey are similar to parrots in diet and environment.\n", "");
Bird Owl= new Bird("Name: Owl\n", "Habitat: Forestry\n", "Eats: Insects\n", "2 Legs\n", "Wingspan: 35in\n", "Owls are worldwide birds that have many sub-classifications.\nThey eat insects and are predators for this reason.\n", "");
Bird Woodpecker = new Bird("Name: Woodpecker\n", "Habitat: Forestry\n", "Eats: Grubs/Insects\n", "2 Legs\n", "Wingspan: 28in\n", "Woodpeckers are worldwide birds that are known for their insect hunting method\nof pecking trees to attract insects\n", "");
Mammal Raccoon = new Mammal("Name: Raccoon\n", "Habitat: Forestry\n", "Eats: Plants/Insects/Rodents\n", "4 Legs\n", "Raccoons live in forestry in several climates.\nThey feed on plants, insects and small rodents such as mice and shrews.\n", "", "");
Otherdiets.add(Lizard);
Otherdiets.add(Chameleon);
Otherdiets.add(carp);
Otherdiets.add(crab);
Otherdiets.add(Vulture);
Otherdiets.add(Parrot);
Otherdiets.add(Toucan);
Otherdiets.add(Owl);
Otherdiets.add(Woodpecker);
Otherdiets.add(Raccoon);
for (int i = 0; i<Otherdiets.size(); i++) {
System.out.println(Otherdiets.get(i));
}
}
public static void main (String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Welcome to YSJ Zoo! Please select an option to get started.\n\n");
System.out.println("1\t Show all of our animals");
System.out.println("2\t Choose a random animal and show their details");
System.out.println("3\t Show our Mammals");
System.out.println("4\t Show our Birds");
System.out.println("5\t Show our Fish");
System.out.println("6\t Show our Reptiles");
System.out.println("7\t Show our desert animals");
System.out.println("8\t Show our arctic/antarctic animals");
System.out.println("9\t Show our jungle/rainforest animals");
System.out.println("10\t Show our forestry/woodland animals");
System.out.println("11\t Show our animals from all environments");
System.out.println("12\t Show our carnivores");
System.out.println("13\t Show our herbivores");
System.out.println("14\t Show our animals with other diets\n");
System.out.println("Please enter your choice:");
int choice=in.nextInt();
switch (choice) {
case 1:
animals();
break;
case 2:
animalsrand();
break;
case 3:
Mammals();
break;
case 4:
birds();
break;
case 5:
fish();
break;
case 6:
reptiles();
break;
case 7:
desert();
break;
case 8:
arctic();
break;
case 9:
jungle();
break;
case 10:
forestry();
break;
case 11:
allenviro();
break;
case 12:
carnivore();
break;
case 13:
herbivore();
break;
case 14:
otherdiet();
break;
default:
System.out.print("Invalid selection, please reload and try again");
}
in.close();
}
}
module inheritanceTest {
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment