Fargus811 / Competition

0 stars 0 forks source link

Don't use input/output in Command layer #29

Open dorohovichandrey opened 4 years ago

dorohovichandrey commented 4 years ago

Don't use input/output in Command layer, use in only in main

   @Override
    public String getInstruction() {
        System.out.println("Доступные действия:");
        System.out.println("1 - посмотреть всех спортсменов");
        System.out.println("2 - посмотреть всех тренеров");
        System.out.println("3 - посмотреть всех позьзователей");
        System.out.println("4 - создать тренера");
        System.out.println("5 - создать спортсмена");
        System.out.println("6 - удалить тренера");
        System.out.println("7 - удалить спортсмена");
        System.out.println("8 - обновить информацию о тренере");
        System.out.println("9 - обновить информацию о спортсмене");

        return "Выберите нужное действие";
    }
Fargus811 commented 4 years ago

I should make this lines in constants?

VladOsipov commented 4 years ago

@Fargus811 Andrey is talking about one input layer. As you know your application has levels as repository, command, service, etc. So, use input only in one layer

@dorohovichandrey correct me if I'm wrong