Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. public class Menu {
  2.  
  3. public void menuInicial() {
  4.  
  5. int opcao = 0;
  6. Scanner sc = new Scanner(System.in);
  7. InserirCliente inserirCliente = new InserirCliente();
  8. InserirFuncionario inserirFuncionario = new InserirFuncionario();
  9. InserirEstoque inserirEstoque = new InserirEstoque();
  10. InserirAgendamento inserirAgendamento = new InserirAgendamento();
  11. BuscarAgendamento buscarAgendamento = new BuscarAgendamento();
  12. Main main = new Main();
  13. Cliente cliente = new Cliente();
  14.  
  15. do {
  16.  
  17. System.out.println("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  18. System.out.println(" BARBEARIA");
  19. System.out.println("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  20. System.out.println("n"
  21. + "1 - Cadastro de Cliente.n"
  22. + "2 - Cadastro de Funcionário.n"
  23. + "3 - Venda de produtos.n"
  24. + "4 - Agendamento de clientes.n"
  25. + "5 - Estoque.n"
  26. + "6 - Encerrar.");
  27. opcao = sc.nextInt();
  28. switch (opcao) {
  29.  
  30. case 1: {
  31. inserirCliente.inserirCliente();
  32. }
  33.  
  34. case 2: {
  35. inserirFuncionario.inserirFuncionario();
  36. }
  37.  
  38. case 4: {
  39. System.out.println("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  40. System.out.println(" AGENDAMENTO");
  41. System.out.println("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  42. System.out.println("n"
  43. + "1 - Novo agendamento.n"
  44. + "2 - Buscar agendamento.");
  45. int opcaoAgendamento = sc.nextInt();
  46. switch (opcaoAgendamento) {
  47. case 1:
  48. inserirAgendamento.inserirAgendamento();
  49. break;
  50. case 2:
  51. buscarAgendamento.buscarAgendamento();
  52. break;
  53. default:
  54. System.out.println("Opção inválida.");
  55. break;
  56. }
  57. }
  58.  
  59. case 5: {
  60. inserirEstoque.inserirEstoque();
  61. }
  62.  
  63. sc.close();
  64. }
  65.  
  66. } while (opcao != 6);
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement