Advertisement
Adam_Kar

Untitled

Oct 24th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.18 KB | None | 0 0
  1. package presentation;
  2.  
  3. import data.ProfessorRepository;
  4. import data.StudentRepository;
  5. import data.SubjectRepository;
  6. import logic.IdentifierProvider;
  7. import logic.ProfessorService;
  8. import logic.StudentService;
  9. import logic.SubjectService;
  10.  
  11. public class ControlerMenu {
  12.  
  13.  
  14.     public ControlerMenu() {
  15.  
  16.     }
  17.  
  18.     public static void callLoginMenu() {
  19.         StudentRepository studentRepository = new StudentRepository();
  20.         ProfessorRepository professorRepository = new ProfessorRepository();
  21.         IdentifierProvider identifierProvider = new IdentifierProvider();
  22.         StudentService studentService = new StudentService(identifierProvider, studentRepository);
  23.         ProfessorService professorService = new ProfessorService(identifierProvider, professorRepository);
  24.         LoginMenu loginMenu = new LoginMenu(professorService, studentService);
  25.         loginMenu.login();
  26.     }
  27.  
  28.     public static void callAdminMenu() {
  29.         StudentRepository studentRepository = new StudentRepository();
  30.         ProfessorRepository professorRepository = new ProfessorRepository();
  31.         IdentifierProvider identifierProvider = new IdentifierProvider();
  32.         StudentService studentService = new StudentService(identifierProvider, studentRepository);
  33.         ProfessorService professorService = new ProfessorService(identifierProvider, professorRepository);
  34.         AdminMenu adminMenu = new AdminMenu(professorService, studentService);
  35.         adminMenu.adminPanel();
  36.     }
  37.  
  38.     public static void callProfessorMenu() {
  39.         SubjectRepository subjectRepository = new SubjectRepository();
  40.         SubjectService subjectService = new SubjectService(subjectRepository);
  41.         ProfessorMenu professorMenu = new ProfessorMenu(subjectService);
  42.         professorMenu.professorMenu();
  43.     }
  44.  
  45.     public static void callStudentMenu() {
  46.         IdentifierProvider identifierProvider=new IdentifierProvider();
  47.         StudentRepository studentRepository=new StudentRepository();
  48.         StudentService studentService=new StudentService(identifierProvider,studentRepository);
  49.         StudentMenu studentMenu=new StudentMenu(studentService);
  50.         studentMenu.studentMenu();
  51.     }
  52. }
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement