Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class App {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- //System.out.print("Инструкция : винаги пишете първата буква на изречението главна.");
- System.out.print("\nКато какъв потребител искате да се впишете в системата?");
- System.out.println("\n 1. Клиент\n 2. Служител\n 3. Искам да се кандидатирам");
- String input = scan.nextLine();
- if (input.equals("1")) {//
- System.out.println("Изберете:\n 1. Мъжко \n 2. Дамско");
- String desiredGender = scan.nextLine();
- switch (desiredGender) { //Начало на switch
- case "1": //Старт на case 1 - за мъжко
- desiredGender = "мъжко";
- while (!input.equalsIgnoreCase("стоп")) {
- System.out.println(" 1. Търсене по вид " + "\n 2. Търсене по размер " + "\n 3. Търсене по бранд" + "\n 4. Търсене по цвят"
- + "\n 5. Търсене по цена" + "\n 6. Търсене по сезон" + "\n 7. Всичко");
- input = scan.nextLine();
- switch (input) { //Начало на switch - за 1,2,3,4...
- case "1":
- System.out.println("Какъв тип дрехи търсите?");
- String desiredType = scan.nextLine();
- Clothes.getClothesType(desiredType, desiredGender);
- break;
- case "2":
- System.out.println("Какъв размер търсите?");
- String desiredSize = scan.nextLine();
- Clothes.getClothesSize(desiredSize, desiredGender);
- break;
- case "3":
- System.out.println("Какъв бранд търсите?");
- String desiredBrand = scan.nextLine();
- Clothes.getClothesBrand(desiredBrand, desiredGender);
- break;
- case "4":
- System.out.println("Какъв цвят търсите?");
- String desiredColor = scan.nextLine();
- Clothes.getClothesColor(desiredColor, desiredGender);
- break;
- case "5":
- System.out.println("До каква цена търсите?");
- double desiredPrice = scan.nextDouble();
- Clothes.getClothesPrice(desiredPrice, desiredGender);
- break;
- case "6":
- System.out.println("За кой сезон търсите?");
- String desiredSeason = scan.nextLine();
- Clothes.getClothesSeason(desiredSeason, desiredGender);
- break;
- case "7":
- Clothes.getAllClothes(desiredGender);
- break;
- default:
- System.out.println("Излязохте извън допустимите опции.");
- break;
- }//Край на switch - за 1,2,3,4...
- } // Край while
- break;
- case "2": //Начало на case 2 - за дамско
- desiredGender = "дамско";
- while (!input.equalsIgnoreCase("стоп")) { //Начало на while
- System.out.println(" 1. Търсене по вид " + "\n 2. Търсене по размер " + "\n 3. Търсене по бранд" + "\n 4. Търсене по цвят"
- + "\n 5. Търсене по цена" + "\n 6. Търсене по сезон" + "\n 7. Всичко");
- input = scan.nextLine();
- switch (input) { //Начало на switch - за 1,2,3,4...
- case "1":
- System.out.println("Какъв тип дрехи търсите?");
- String desiredType = scan.nextLine();
- Clothes.getClothesType(desiredType, desiredGender);
- break;
- case "2":
- System.out.println("Какъв размер търсите?");
- String desiredSize = scan.nextLine();
- Clothes.getClothesSize(desiredSize, desiredGender);
- break;
- case "3":
- System.out.println("Какъв бранд търсите?");
- String desiredBrand = scan.nextLine();
- Clothes.getClothesBrand(desiredBrand, desiredGender);
- break;
- case "4":
- System.out.println("Какъв цвят търсите?");
- String desiredColor = scan.nextLine();
- Clothes.getClothesColor(desiredColor, desiredGender);
- break;
- case "5":
- System.out.println("До каква цена търсите?");
- double desiredPrice = scan.nextDouble();
- Clothes.getClothesPrice(desiredPrice, desiredGender);
- break;
- case "6":
- System.out.println("За кой сезон търсите?");
- String desiredSeason = scan.nextLine();
- Clothes.getClothesSeason(desiredSeason, desiredGender);
- break;
- case "7":
- Clothes.getAllClothes(desiredGender);
- break;
- default:
- System.out.println("Излязохте извън допустимите опции.");
- break;
- }//Край на switch - за 1,2,3,4...
- }//Край на while
- }//Край на switch(desiredGender)
- }//Край на if
- else if (input.equals("2")) { //Служители - вход + промяна на цена
- System.out.println("Въведете вашето име");
- String name = scan.nextLine();
- System.out.println("Въведете вашата фамилия");
- String family = scan.nextLine();
- System.out.println("Въведете вашето ЕГН");
- String egn = scan.nextLine();
- Employee.getEmployee(name, family, egn);
- }
- else if (input.equals("3")) { // Изисквания за кандидатстване
- System.out.println("Изисквания : \nНавършени 19 години; \nПоне година стаж в тази сфера; \nОбразование над или на ниво 'Средно';\n");
- System.out.println("Въведете вашето име");
- String name = scan.nextLine();
- System.out.println("Въведете вашата фамилия");
- String family = scan.nextLine();
- System.out.println("Въведете вашите години");
- int age = Integer.parseInt(scan.nextLine());
- System.out.println("Въведете вашето ЕГН");
- String egn = scan.nextLine();
- System.out.println("Въведете вашият опит");
- int experience = Integer.parseInt(scan.nextLine());
- System.out.println("Въведете вашето образование");
- String education = scan.nextLine();
- Applications.getApplications(age, experience, education,egn);
- }
- else{
- System.out.println("Излязохте извън допустимите опции.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement