Advertisement
Montoya-Romina-Anahi

TP5-Punto1(Main)

Jul 3rd, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. public class main {
  2.  
  3. public static void main(String[] args) {
  4. ArbolBinario abo = new ArbolBinario ();
  5. abo.insertar (40);
  6. abo.insertar (50);
  7. abo.insertar (30);
  8. abo.insertar (20);
  9. abo.insertar (35);
  10. abo.insertar (10);
  11. abo.insertar (25);
  12. abo.insertar (5);
  13. abo.insertar (32);
  14. abo.insertar (45);
  15. abo.insertar (55);
  16. abo.insertar (42);
  17. System.out.println ("Presentacion del arbol en orden: ");
  18. abo.imprimirEntre ();
  19. System.out.println ("Cantidad de nodos del árbol:"+abo.cantidad());
  20. System.out.println ("Cantidad de hoja:"+abo.cantidadNodosHoja());
  21. System.out.println ("Presentacion en orden junto al nivel del nodo.");
  22. abo.imprimirEntreConNivel();
  23. System.out.print ("Altura del arbol:");
  24. System.out.println(abo.retornarAltura());
  25. System.out.println ("Presentacion en orden descendiente");
  26. abo.DescendingOrder();
  27. System.out.println();
  28.  
  29.  
  30.  
  31. }
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement