Commit 1870f54f authored by sam.pople's avatar sam.pople

Submission

parents
import java.util.ArrayList;
import java.util.Scanner;
public class App {
public static void app(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Animals> Animals = new ArrayList<Animals>();
// Mammals
Animals Gorilla = new Mammals("Gorilla", "Gorillas are large and strong primates.", "Walks", "14:00", "12:00");
Gorilla.foodType = new Vegetarian("Fruits");
Gorilla.Environment = new Woodlands("Jungle", "Tropical forest teeming with food and wildlife", "Africa", 20, 30);
Animals.add(Gorilla);
Animals Lion = new Mammals("Lion", "Lions are large big cats with sharp teeth that form prides", "Roars", "15:00", "11:00");
Lion.foodType = new Carnivore("Meat (specifically Wildebeasts, Zebras and Antelopes)");
Lion.Environment = new Savannah("Savanna", "A grassy woodland", "Africa", 50, 50);
Animals.add(Lion);
Animals Wolf = new Mammals("Wolf", "Wolves are large canines that hunt in packs.", "Howls", "16:00", "13:00");
Wolf.foodType = new Carnivore("Meat (specifically deer, hares and moose");
Wolf.Environment = new Woodlands("Forest", "A relatively cold, in this case, ecosystem full of trees.", "North America", 5, 45);
Animals.add(Wolf);
Animals Seal = new Mammals("Seal", "Seals are sea mammals that swim in the ocean", "Swims", "11:30", "12:15");
Seal.foodType = new Carnivore("Fish");
Seal.Environment = new Marine("Cold Oceans", "Cold costal parts of the sea", "Around the Arctic", 0, 20);
Animals.add(Seal);
Animals Elephant = new Mammals("Elephant", "Large trunked and tusked mammals", "Swims", "11:30", "12:15");
Elephant.foodType = new Vegetarian("Shrubs, herbs and fruits");
Elephant.Environment = new Savannah("Savanna", "Grassy desert lands", "Africa", 50, 50);
Animals.add(Elephant);
// Birds
Animals Falcon = new Mammals("Falcon", "An incredibly fast bird of prey with a sharp beak and talons", "Swoops down", "14:30", "15:45");
Falcon.foodType = new Carnivore("Rats");
Falcon.Environment = new Savannah("Deserts", "Large open spaces for it to hunt", "Australia", 65, 10);
Animals.add(Falcon);
Animals Owl = new Birds("Owl", "A round, forward looking bird with acute hearing and vision", "Head-rotates", "16:30", "18:00");
Owl.foodType = new Omnivore("Insects");
Owl.Environment = new Woodlands("Rocky terrain", "Mountainous area with much open space", "Any country except Antartica", 15, 5);
Animals.add(Owl);
Animals Blackbird = new Birds("Blackbird", "A glossy, medium sized black bird.", "Tweets", "9:30", "8:15");
Blackbird.foodType = new Omnivore("Berries");
Blackbird.Environment = new Woodlands("Grassland", "Grassy land with alot of life and space", "Europe, Russia, North Africa", 25, 4);
Animals.add(Blackbird);
// Reptiles
Animals Crocodile = new Reptiles("Crocodile", "Predatory reptiles with armour and snapping jaws.", "Snaps", "13:00", "14:00");
Crocodile.foodType = new Carnivore("Meat (specifically small mammals and fish)");
Crocodile.Environment = new Savannah("Savannah Rivers", "Mirky rivers for them to prey", "Africa", 50, 20);
Animals.add(Crocodile);
Animals Snake = new Reptiles("Snake", "Limbless slithering reptiles with sharp fangs and often venom", "8:45", "11:45", "Slithers");
Snake.foodType = new Carnivore("Rats");
Snake.Environment = new Savannah("Desert", "Dry grasslands", "Africa", 50, 10);
Animals.add(Snake);
// Fish
Animals Shark = new Fish("Shark", "Sharks are long bodied, predatory, marine fish with dorsal fins and sharpteeth", "Swim hunting", "15:30", "11:45");
Shark.foodType = new Carnivore("Meat (specifically Fish and Seals");
Shark.Environment = new Marine("Ocean", "Costal and offshore waters where fish and prey are plentiful", "Around United States", 18, 20);
Animals.add(Shark);
Animals Clownfish = new Fish("Clownfish", "Fish with an orange and white pattern that are immune to h", "Swim hunting", "15:30", "11:45");
Clownfish.foodType = new Omnivore("Zooplankton");
Clownfish.Environment = new Marine("Sheltered reefs", "They live in anemones in warm reefs", "Pacific Ocean", 24, 3);
Animals.add(Clownfish);
System.out.println("Animals: ");
for (int i = 0; i < Animals.size(); i++) {
System.out.println(Animals.get(i));
}
}
}
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