Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- Birds bird = new Birds();
- Cats cat = new Cats();
- System.out.print("There're some facts about birds and cats. \n" +
- " Choose number one of them(type 1(birds) or 2(cats): \n");
- int choice = in.nextInt();
- if (choice == 1) {
- System.out.print("There're some facts about birds. Write number one of them to see it: \n" +
- "1. Paws' quantity; 2. Tail existing; 3. Mass; 4. Predators; 5. Flying ability; 6. The biggest Wings' Size \n");
- for (int i = 6; i != 0; i--) {
- int choice2 = in.nextInt();
- if (choice2 == 1)
- System.out.println(bird.pawsQuantity);
- else if (choice2 == 2)
- System.out.println(bird.tail);
- else if (choice2 == 3)
- System.out.println(bird.mass);
- else if (choice2 == 4)
- System.out.println(bird.predators);
- else if (choice2 == 5)
- System.out.println(bird.flyingAbility);
- else if (choice2 == 6)
- System.out.println(bird.theBiggestWingsSize);
- }
- }
- else if (choice == 2) {
- System.out.print("There're some facts about cats. Write number one of them to see it: \n" +
- "1. Paws' quantity; 2. Tail existing; 3. Mass; 4. Predators; 5. Are they hiding claws?; 6. Do they piss in your sleepers? \n");
- for (int i = 6; i != 0; i--) {
- int choice2 = in.nextInt();
- if (choice2 == 1)
- System.out.println(cat.pawsQuantity);
- else if (choice2 == 2)
- System.out.println(cat.tail);
- else if (choice2 == 3)
- System.out.println(cat.mass);
- else if (choice2 == 4)
- System.out.println(cat.predators);
- else if (choice2 == 5)
- System.out.println(cat.hideClaws);
- else if (choice2 == 6)
- System.out.println(cat.howManyTimesTheyPissedInUrSleepers);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment