monkeyslut45

Кирилл Деменев

Feb 8th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.86 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner in = new Scanner(System.in);
  9.         Birds bird = new Birds();
  10.         Cats cat = new Cats();
  11.  
  12.         System.out.print("There're some facts about birds and cats. \n" +
  13.                 " Choose number one of them(type 1(birds) or 2(cats): \n");
  14.  
  15.         int choice = in.nextInt();
  16.         if (choice == 1) {
  17.             System.out.print("There're some facts about birds. Write number one of them to see it: \n" +
  18.                     "1. Paws' quantity; 2. Tail existing; 3. Mass; 4. Predators; 5. Flying ability; 6. The biggest Wings' Size \n");
  19.             for (int i = 6; i != 0; i--) {
  20.                 int choice2 = in.nextInt();
  21.                 if (choice2 == 1)
  22.                     System.out.println(bird.pawsQuantity);
  23.                 else if (choice2 == 2)
  24.                     System.out.println(bird.tail);
  25.                 else if (choice2 == 3)
  26.                     System.out.println(bird.mass);
  27.                 else if (choice2 == 4)
  28.                     System.out.println(bird.predators);
  29.                 else if (choice2 == 5)
  30.                     System.out.println(bird.flyingAbility);
  31.                 else if (choice2 == 6)
  32.                     System.out.println(bird.theBiggestWingsSize);
  33.             }
  34.         }
  35.         else if (choice == 2) {
  36.             System.out.print("There're some facts about cats. Write number one of them to see it: \n" +
  37.                     "1. Paws' quantity; 2. Tail existing; 3. Mass; 4. Predators; 5. Are they hiding claws?; 6. Do they piss in your sleepers? \n");
  38.  
  39.             for (int i = 6; i != 0; i--) {
  40.                 int choice2 = in.nextInt();
  41.                 if (choice2 == 1)
  42.                     System.out.println(cat.pawsQuantity);
  43.                 else if (choice2 == 2)
  44.                     System.out.println(cat.tail);
  45.                 else if (choice2 == 3)
  46.                     System.out.println(cat.mass);
  47.                 else if (choice2 == 4)
  48.                     System.out.println(cat.predators);
  49.                 else if (choice2 == 5)
  50.                     System.out.println(cat.hideClaws);
  51.                 else if (choice2 == 6)
  52.                     System.out.println(cat.howManyTimesTheyPissedInUrSleepers);
  53.             }
  54.         }
  55.     }
  56. }
Add Comment
Please, Sign In to add comment