System.out.print("York St John Zoo: Menu\n\nPlease select the number of the section you would like to view!\n\n1: View Individual Animal.\n2. Display"
+" the details of each animal.\n3. View animal of particular type.\n4. Display the food required for all animals.\n5. Exit program\n");
//Creating the menu screen
System.out.print("\n\nYork St John Zoo: Menu\n\nPlease select the number of the section you would like to view!\n\n1: View Individual Animal.\n2. Display"
+" the details of each animal.\n3. View animal of particular type.\n4. "
+"Display the food required for all animals.\n5. Display list of animals from a specific environment\n6. Exit Program\n\n");
//Allows the user to choose which section they want to go to
menuChoice=input.nextInt();
//A switch statement to send the user to their desired option
switch(menuChoice){
case1:
System.out.print("Please enter the species of animal you would like to view. To see what animals are available choose option 2 on the menu"
+" screen.\nPlease note that this is case sensitive\n\n");
//Allows the user to decide what animal they want to view
animalInput=input.next();
case2:
//Runs the specificAnimals method
zoo.specificAnimals(animalInput);
System.out.println("\nType 1 to go back to the menu");
zoo.allAnimals();
//User can input the correct number to make the program continue
continueProgram=input.nextInt();
//If the input number is equal to 1 the program will continue
if(continueProgram==1){
break;
}
case2:
System.out.print("Here are all of our animals");
//Runs the view all animals method
zoo.viewAllAnimals();
System.out.println("\nType 1 to go back to the menu");
//This section allows the user to enter a number and if that number matches with the number in the if statement the program will continue
continueProgram=input.nextInt();
if(continueProgram==1){
break;
}
case3:
System.out.print("Please enter the type you would like to view. There are four types; Mammals, Reptiles, Fish and Birds. "
+"\nPlease note that this is case sensitive\n\n");
//Allows the user to input animal type
typeInput=input.next();
//Runs the specificType method inside of my animals class
zoo.specificType(typeInput);
System.out.println("\nType 1 to go back to the menu");
//This section allows the user to enter a number and if that number matches with the number in the if statement the program will continue
continueProgram=input.nextInt();
if(continueProgram==1){
break;
}
case4:
System.out.print("Here is the food eaten by our animals.");
//Runs the viewAllAnimalsFood method within my animals class
zoo.viewAllAnimalsFood();
System.out.println("\nType 1 to go back to the menu");
//This section allows the user to enter a number and if that number matches with the number in the if statement the program will continue
continueProgram=input.nextInt();
if(continueProgram==1){
break;
}
case5:
System.out.print("Please enter the environment you would like to view. To see what animals are available choose option 2 on the menu\n"
+" screen. Please note that this is case sensitive\n\n");
//Allows the user to enter a environment
environmentInput=input.next();
//Runs the specificEnviroment method
zoo.specificEnviroment(environmentInput);
//This section allows the user to enter a number and if that number matches with the number in the if statement the program will continue
System.out.println("\nType 1 to go back to the menu");
continueProgram=input.nextInt();
if(continueProgram==1){
break;
}
case6:
//Displays text and exits program
System.out.println("\nExiting Program!");
System.exit(0);
break;
default:
//If the wrong number is input this code will run.
System.out.print("That option was not on the list! Please type 1 to continue");