package ru.job4j.Tracker;

import java.util.Scanner;

/**
 * Created by Comp on 12.06.2017.
 */
public class StartUI {
    private static int num;
    private Input input;

    public StartUI(Input input) {
        this.input = input;
    }

    public void init() {

        String[] init = new String[]{
                this.input.ask("0. Add new Item"),
                this.input.ask("1. Show all items"),
                this.input.ask("2. Edit item"),
                this.input.ask("3. Delete item"),
                this.input.ask("4. Find item by Id"),
                this.input.ask("5. Find items by name"),
                this.input.ask("6. Exit Program"),

        };
        System.out.println("Select: ");
        Scanner scanner = new Scanner(System.in);
        scanner.nextLine();

        switch (num) {
            case 0:
                System.out.println("Введите имя пользователя и описание заявки: ");
                String a = scanner.nextLine();
                Tracker tracker = new Tracker();
                tracker.add();
                break;
            case 1:
                System.out.println("Показать все заявки: ");
                String b = scanner.nextLine();
            case 2:
                System.out.println("Введите id пользователя: ");
                String c = scanner.nextLine();
            case 3:
                System.out.println("Введите id пользователя: ");
                String d = scanner.nextLine();
            case 4:
                System.out.println("Введите id пользователя: ");
                String e = scanner.nextLine();
            case 5:
                System.out.println("Введите имя пользователя: ");
                String g = scanner.nextLine();
            case 6:
                System.out.println("Выйти из программы: ");
                String k = scanner.nextLine();
        }
    }

    public static void main(String[] args) {
        Input inputCons = new ConsoleInput();
        //inputCons.ask(tracker.add())
        new StartUI(inputCons).init();
    }
}

@@ -164,16 +164,45 @@
 t input;
+%0A    private Tracker tracker;
 %0A%0A    pu
@@ -225,16 +225,33 @@
 ut input
+, Tracker tracker
 ) %7B%0A    
@@ -274,26 +274,129 @@
  input;%0A    
-%7D%0A
+    this.tracker = tracker;%0A    %7D%0A   /*%0A    test1%0A    1%0A    test1%0A    this test Tracker1%0A    16/06/2017*/
 %0A    public 
@@ -409,17 +409,16 @@
 nit() %7B%0A
-%0A
         
@@ -942,16 +942,18 @@
 ine();%0A%0A
+%0A%0A
         
@@ -1098,78 +1098,310 @@
 ing 
-a = scanner.nextLine();%0A                Tracker tracker = new Tracker(
+key = scanner.nextLine();%0A                String id = scanner.nextLine();%0A                String name = scanner.nextLine();%0A                String comments = scanner.nextLine();%0A                Long creat = System.currentTimeMillis();%0A                Item item = new Item(key, id, name, comments, creat
 );%0A 
@@ -1427,16 +1427,20 @@
 ker.add(
+item
 );%0A     
@@ -2232,32 +2232,89 @@
 nner.nextLine();
+%0A%0A                if (k.equals(%22y%22)) %7B%0A%0A                %7D
 %0A        %7D%0A    %7D

change in task ConsoleInput