Skip to content

This Java program allows you to manipulate different types of trees and perform various operations on them. You can use this project to learn how to implement binary trees, binary insertion trees and B-Trees manually. Topics

License

Notifications You must be signed in to change notification settings

e1th4nUwU/Java_Tree_manipulation_program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Tree Manipulation Program 🌳🔧

Tree Image This Java program allows you to manipulate different types of trees and perform various operations on them.

Binary Tree Menu 🌳

  1. Exit: Exit the program. ❌
  2. Reset Tree: Clear the binary tree. 🔄
  3. Add Data: Add a node to the binary tree. ➕
  4. Delete Node: Delete a node from the binary tree. 🗑️
  5. Print Tree (BFS): Print the binary tree using Breadth-First Search traversal. 🌐
  6. Preorder: Print the binary tree using Preorder traversal. 🌳🔼
  7. Inorder: Print the binary tree using Inorder traversal. 🌳✅
  8. Postorder: Print the binary tree using Postorder traversal. 🌳🔽
  9. View Nodes with Children: Display the nodes of the binary tree along with their children. 👥

Binary Search Tree Menu 🔍🌳

  1. Exit: Exit the program. ❌
  2. Reset Tree: Clear the binary search tree. 🔄
  3. Add Data: Add a node to the binary search tree. ➕
  4. Delete Node: Delete a node from the binary search tree. 🗑️
  5. Search: Search for specific data in the binary search tree. 🔍
  6. Print Tree (BFS): Print the binary search tree using Breadth-First Search traversal. 🌐

B-Tree Menu 🅱️🌳

  1. Exit: Exit the program. ❌
  2. Reset Tree: Clear the B-Tree. 🔄
  3. Add Data: Add data to the B-Tree. ➕
  4. Search Data: Search for specific data in the B-Tree. 🔍
  5. Print Tree: Print the B-Tree. 🌳🌐

Compiling the Code 🛠️

To compile the code, follow these steps:

  1. Ensure you have the Java Development Kit (JDK) installed on your system. ☕

  2. Save the code in a file named Main.java.

  3. Open a terminal or command prompt and navigate to the directory containing Main.java.

  4. Run the following command to compile the code:

    javac Main.java
    
  5. If there are no syntax errors, the code will be compiled, and a Main.class file will be generated.

Running the program▶️

To run the program, use the following command:

java Main

Running the Program from a JAR File 📦

Alternatively, if you have a JAR file named Arboles.jar, you can run the program using the following command:

java -jar Arboles.jar

That's it! You can now compile and run the Java program to manipulate different types of trees and perform various operations on them. Enjoy! 😄🌳

About

This Java program allows you to manipulate different types of trees and perform various operations on them. You can use this project to learn how to implement binary trees, binary insertion trees and B-Trees manually. Topics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages