Outprintln continuar enter n string

This preview shows page 18 - 19 out of 19 pages.

System.out.println(" Continuar enter/ n"); String opcion=entrada.readLine(); opcion=opcion.equals("")?"a":opcion; op = opcion.charAt(0); } } public void buscarEnElArbol(Nodo ant, Nodo p, Nodo x){ if(p!=null){ if(Integer.parseInt(x.getDato().toString())==Integer.parseInt(p.getDato().toSt ring())){ miArbol.eliminar(ant, p); }else{ if(Integer.parseInt(x.getDato().toString())>Integer.parseInt(p.getDato().toStri ng())){ buscarEnElArbol(p,p.getPd(),x); }else{ buscarEnElArbol(p,p.getPi(),x); } } } } public void imprimirArbol(){ System.out.println("====================="); System.out.println("Elementos del arbol"); miArbol.imprimir(miArbol.getRaiz()) ; System.out.println(""); System.out.println("=====================");} public void mostrarOpciones(){ System.out.println("================="); System.out.println(" Opciones de Arbol");
Image of page 18

Subscribe to view the full document.

System.out.println("1- Generar"); System.out.println("2- Eliminar"); System.out.println("3- Imprimir"); System.out.println("Ingrese su opciones:"); } public void menu()throws Exception{ int op = 9; do{ switch (op) { case 1: generar(); break; case 2: eliminarNodo(); break; case 3: imprimirArbol(); break;} mostrarOpciones(); String opc = entrada.readLine(); opc = opc.equals("")?"9":opc; op=Integer.parseInt(opc); }while(op!=0); } public static void main(String[] args)throws Exception { ArbolAplicacion mi=new ArbolAplicacion(); mi.menu(); }} Clase Principal public class Principal { public static void main(String[] args) throws Exception { ArbolAplicacion miA=new ArbolAplicacion(); miA.menu(); }}
Image of page 19
  • Summer '17
  • ME
  • Teoría de grafos, Estructura de datos, Conjunto finito, Grafo, Ciencias de la computación

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern