Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1. public class Main {  
  2.  
  3.     public static void main(String[] args) {
  4.         Scanner reader = new Scanner(System.in);
  5.        
  6.         Database data = new Database();
  7.         while (true) {
  8.             System.out.println("? ");
  9.             String command = reader.nextLine();
  10.            
  11.             if (command.equalsIgnoreCase("add")) {
  12.                 System.out.println("Name: ");
  13.                 String name = reader.nextLine();
  14.                 System.out.println("Latin Name: ");
  15.                 String latinName = reader.nextLine();
  16.                 data.addBird(new Bird(name, latinName));
  17.             }
  18.             if (command.equalsIgnoreCase("quit")){
  19.                 break;
  20.             }            
  21.             if (command.equalsIgnoreCase("observation")){
  22.                 for (Bird i : data)
  23.             }        
  24.             }
  25.  
  26.    
  27.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement