0

Go down the list

how can i implement the drop in this swith, a small public class TestGestionHospital { public static void main( String[] args ) { int opc; Scanner teclado = new Scanner(System.in); //Administradores AdminPolizaDTO admPoliza = new AdminPolizaDTOImpl(); AdminMascotaDTO admMascota = new AdminMascotaDTOImpl(); MascotaDTO mascota = new MascotaDTO("Chloe","Perro","Cabeza de Venado", "788945", 1 , "Capulhuac EDOMEX", "Luz "); MascotaDTO mascota1=new MascotaDTO("Azul","Pescado","Pez" ,"2145670", 3 , "San Mateo EDOMEX", "Laura"); MascotaDTO masc = new MascotaDTO("Santa", "Ave","Rapina", "4785", 10, "Toluca", "Zara"); //Solicitud de Poliza do { opc = menu(); switch( opc ) { case 1: leePolizas(admPoliza); //leeDatos(admMascota, admPoliza); break; case 2: salvarPoliza(admPoliza); break; case 3: admPoliza.alta( nuevaPoliza( nuevaMascota () )); break; case 4: break; case 5: break; case 6: break; case 7: admPoliza.consulta(); break; case 8: buscaPoliza( admPoliza ); break; default: System.out .println( "Opcion invalida \n" ); } } while (opc != 0); } private static int menu() { int opcion; Scanner sc = new Scanner(System.in); System.out.println("\n Poliza de Seguro \n"); System.out.println("1. Cargar Datos de Archivo \n");// System.out.println("2. Guardar Datos \n");// System.out.println("3. Solicitar Poliza \n");// System.out.println("4. Baja de Poliza \n"); System.out.println("5. Actualizar Viegencia de la Poliza \n"); System.out.println("6. Actualizar Datos de la Mascota \n"); System.out.print

14th Jul 2020, 3:26 AM
Young Money
Young Money - avatar
3 Respostas
+ 2
Uriel Alviter Monrroy The code is truncated because it is too big to fit in the thread Description. You need to save the code in SoloLearn and share the saved code link instead to avoid truncation from character limits. See this post to understand how to share links 👍 https://www.sololearn.com/post/75089/?ref=app
14th Jul 2020, 7:15 AM
Ipang
+ 1
I'm into Java, but for me it's totally unclear what's your question / problem. What drop? Small?
14th Jul 2020, 3:40 AM
Sandra Meyer
Sandra Meyer - avatar
0
int opc; while ( (opc=menu()) != 0) { switch( opc ) { case 1: break; } }
14th Jul 2020, 7:29 AM
zemiak