JosephGlz

Clase Main

Apr 13th, 2021
794
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.65 KB | None | 0 0
  1. package com.mycompany.programa_gestiongrupos;
  2. import java.util.Scanner;
  3.  
  4. public class Grupos_main
  5. {
  6.     public static void main(String[] args)
  7.     {
  8.         Scanner read = new Scanner(System.in);
  9.        
  10.         Grupos Grupo1 = new Grupos();
  11.         Grupos Grupo2 = new Grupos();
  12.         Grupos Grupo3 = new Grupos();
  13.        
  14.         /*int op = 0, op1 = 0;
  15.        
  16.         do
  17.         {
  18.             System.out.println("_______________________________________");
  19.             System.out.println("Seleccione el grupo que desea: ");
  20.             System.out.println("    1)  Grupo 1");
  21.             System.out.println("    2)  Grupo 2");
  22.             System.out.println("    3)  Grupo 3");
  23.             op = read.nextInt();
  24.             do
  25.             {
  26.                 System.out.println("_______________________________________");
  27.                 System.out.println("Seleccione la opción que desea realizar: ");
  28.                 System.out.println("    0) Regresar");
  29.                 System.out.println("    1) Gestionar Grupo");
  30.                 System.out.println("    2) Información de Grupo");
  31.                 op1 = read.nextInt();
  32.                
  33.                 switch(op)
  34.                 {
  35.                     case 1:
  36.                     {
  37.                         if(op1 == 1)
  38.                         {
  39.                             Grupo1.ShowGestionMenu();
  40.                         }
  41.                         else if(op1 == 2)
  42.                         {
  43.                             Grupo1.ShowMenuInfo();
  44.                         }
  45.                         break;
  46.                     }
  47.                     case 2:
  48.                     {
  49.                         if(op1 == 1)
  50.                         {
  51.                             Grupo2.ShowGestionMenu();
  52.                         }
  53.                         else if(op1 == 2)
  54.                         {
  55.                             Grupo2.ShowMenuInfo();
  56.                         }
  57.                         break;
  58.                     }
  59.                     case 3:
  60.                     {
  61.                         if(op1 == 1)
  62.                         {
  63.                             Grupo3.ShowGestionMenu();
  64.                         }
  65.                         else if(op1 == 2)
  66.                         {
  67.                             Grupo3.ShowMenuInfo();
  68.                         }
  69.                         break;
  70.                     }
  71.                     default:
  72.                     {
  73.                         System.exit(0);
  74.                     }
  75.                 }
  76.             }while(op1 > 0);
  77.            
  78.         }while(op > 0);*/
  79.         System.out.println(" Nel perro, hechale ganas");
  80.     }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment