Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- Scanner reader = new Scanner(System.in);
- Database data = new Database();
- while (true) {
- System.out.println("? ");
- String command = reader.nextLine();
- if (command.equalsIgnoreCase("add")) {
- System.out.println("Name: ");
- String name = reader.nextLine();
- System.out.println("Latin Name: ");
- String latinName = reader.nextLine();
- data.addBird(new Bird(name, latinName));
- }
- if (command.equalsIgnoreCase("quit")){
- break;
- }
- if (command.equalsIgnoreCase("observation")){
- for (Bird i : data)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement