Commit 72573186 authored by jinny.wilkin's avatar jinny.wilkin

oops

parent 3483040d
import java.util.Scanner;
public class Zoo {
public Animal[] animals;
public Object[] arr = new Object[11];
public void main(){
}
public void createAnimal(){
Scanner input = new Scanner(System.in);
System.out.print("What is the new animal: ");
String newAnimal = input.nextLine();
if (newAnimal.toLowerCase() == "baboon"){
createBaboon();
}
input.close();
}
public void createAnimalClass(){
Scanner in = new Scanner(System.in);
System.out.print("What kind of habitat do they need: ");
arr[0] = in.nextLine();
System.out.print("What food do they eat: ");
arr[1] = in.nextLine();
System.out.print("What is their name: ");
arr[2] = in.nextLine();
System.out.print("How old are they: ");
arr[3] = in.nextLine();
System.out.print("What kind of integument do they possess: ");
arr[4] = in.nextLine();
System.out.print("What is their gender: ");
arr[5] = in.nextLine();
System.out.print("How many legs do they have: ");
arr[6] = in.nextLine();
System.out.print("How fast are they: ");
arr[7] = in.nextLine();
in.close();
}
public void createMammal(){
createAnimalClass();
Scanner in = new Scanner(System.in);
System.out.print("How tall are they: ");
arr[8] = in.nextLine();
System.out.print("Are they bipedal or quadrapedal: ");
arr[9] = in.nextLine();
in.close();
}
public void createBird(){
createAnimalClass();
Scanner in = new Scanner(System.in);
System.out.print("How wide are their wings: ");
arr[8] = in.nextLine();
System.out.print("What colour are their feathers: ");
arr[9] = in.nextLine();
in.close();
}
public void createFish(){
createAnimalClass();
Scanner in = new Scanner(System.in);
System.out.print("What colour are they: ");
arr[8] = in.nextLine();
System.out.print("How long are they: ");
arr[9] = in.nextLine();
in.close();
}
public void createReptile(){
createAnimalClass();
Scanner in = new Scanner(System.in);
System.out.print("Are they amphibious: ");
arr[8] = in.nextLine();
System.out.print("How long are they: ");
arr[9] = in.nextLine();
in.close();
}
}
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