System.out.println("Display the details of an animal [1]");
System.out.println("Display the details of each animal [2]");
System.out.println("Display all animals of a particular type [3]");
System.out.println("Display the food required for all the animals [4]");
System.out.println("Display all the animals from a specified environment [5]");
MenuInput();
}
staticvoidMenuInput()
{
System.out.println("Select an option by typing out the number that corresponds to the above options: ");
Scannerscan=newScanner(System.in);
intinput=scan.nextInt();
MenuChoice(input);
}
staticvoidMenuChoice(intinput)
{
AnimalSaber=newAnimal();
Saber.animal="Tiger";
Saber.desc="Tigers are the largest living cat species. They are mostly known for their black stripes and orange fur. They primarily eat deer, wild boar and elephant calves.";
Saber.type="Mammal";
Saber.food="Meat";
Saber.environment="Jungle";
Saber.name="Saber";
Saber.animaldesc="Saber is a new addition to our zoo! Saber loves to make friends and is generally friendly around new people. Her mesmerizing yellow eyes, black striped orange fur and sharp fangs is a sight not to be missed!";
AnimalBingo=newAnimal();
Bingo.animal="Monkey";
Bingo.desc="Monkeys are intelligent, social animals that tend to reside in the trees in jungles. Monkeys are mainly vegetarian however they can may eat meat as well. Some monkeys are small at about 15 centimetres whilst other monkeys are much larger at about 1 metre.";
Bingo.type="Mammal";
Bingo.food="Fruits, Nuts and Meat";
Bingo.environment="Jungle";
Bingo.name="Bingo";
Bingo.animaldesc="Bingo is a funny and energetic monkey that loves to climb and socialize with visitors and especially his female counterpart Ella. Visitors are surely going to have a fun time with Bingo.";
AnimalElla=newAnimal();
Ella.animal="Monkey";
Ella.desc="Monkeys are intelligent, social animals that tend to reside in the trees in jungles. Monkeys are mainly vegetarian however they can may eat meat as well. Some monkeys are small at about 15 centimetres whilst other monkeys are much larger at about 1 metre.";
Ella.type="Mammal";
Ella.food="Fruits, Nuts and Meat";
Ella.environment="Jungle";
Ella.name="Ella";
Ella.animaldesc="Ella is Bingo's female counterpart. While not as energetic or sociable as Bingo, Ella still finds comfort in her zoo habitat and visitors and enjoys climbing with Bingo when she is in the mood.";
AnimalIris=newAnimal();
Iris.animal="Owl";
Iris.desc="Owls are a species of bird known for being solitary and nocturnal. Fun fact: They are the only large group of birds that hunt at night. They eat mammals such as insects and other birds.";
Iris.type="Bird";
Iris.food="Insects and Meat";
Iris.environment="Forest";
Iris.name="Iris";
Iris.animaldesc="Iris is a quiet bird who enjoys being by herself in the trees. Her fluffy feathers and golden eyes will make anyone dazzled.";
AnimalLizzie=newAnimal();
Lizzie.animal="Lizard";
Lizzie.desc="Lizards are a type of reptile that make up about 6,000 different species. The size of the lizard varies from geckos that are a few inches/cm to a Komodo dragon that are 3 metres long. They primarily eat worms.";
Lizzie.type="Reptile";
Lizzie.food="Worms";
Lizzie.environment="Desert";
Lizzie.name="Lizzie";
Lizzie.animaldesc="Lizzie is a unique and interesting animal. She spends her days patiently waiting for any worms to cross her path. ";
AnimalOllie=newAnimal();
Ollie.animal="Clownfish";
Ollie.desc="Clownfish are a type of fish that live in the Indian and Pacific Oceans. They reside in anemones under the sea. Clownfish can group to 18 centimetres. Clownfish can look orange, yellow or red. They primarily eat Food Scraps, Larvae and Algae.";
Ollie.type="Fish";
Ollie.food="Food Scraps, Larvae and Algae";
Ollie.environment="Ocean";
Ollie.name="Ollie";
Ollie.animaldesc="Ollie spends his days swimming in his aquarium looking for food and fun places to swim.";
ArrayListAnimalList=newArrayList();
AnimalList.add(Saber);
AnimalList.add(Bingo);
AnimalList.add(Ella);
AnimalList.add(Iris);
AnimalList.add(Lizzie);
AnimalList.add(Ollie);
if(input==1)
{
System.out.println("Type the name of the animal you want to see the details of: ");