1 Attachment(s)
Evaluation, Suggestions, Comments
Hello there guys, I have finally come up with a rough draft of my Binary Tree program. Could you please try it and comment it?
Your suggestions are welcome. OH... And don't worry, I added the Source Code if you want to compile and run it rather than running the exe file. :)
Things provided in this Program:
1.- Node Structure
2.- Binary Tree Structure
3.- Adding Nodes to the Tree
4.- Searching Nodes to the Tree
5.- Erasing Nodes of the Tree
6.- Balancing the Tree
-> a) Most-Left Rotation
-> b) Most-Right Rotation
-> c) RR
-> d) LL
-> e) RL
-> f) LR
7.- Graphing the Tree
8.- Calculate Level, Left Height, Right Height, etc. Of a Node
9.- Showing Node Statistics by clicking on it (Also moving the mouser over will trigger a tooltip showing them)
10.- InOrder, PreOrder, PostOrder code supporting a call to other procedure
New Characteristics (In the new version):
1.- Search Engine Added
2.- You can enter the number inside the node to erase it
3.- Some Resizing Bugs fixed (Well, the code for resizing was not my priority before, but it seems to be popular... )
4.- It won't let you resize the form to be less than a certain amount in Width and Height (Yet it blinks, I wonder why, Still Blinking)
5.- First Erase Bug fix
6.- Tab Indexes corrected
7.- Scrolling Bar Issue corrected (It used to overlap)
8.- Letting clear the Tree (I forgot to add "CG = 0")
9.- Auto-Selects the Text of the Search and Erase
10.- Clears All Text boxes when clearing the Tree
Remember "Gosh, are you really a programmer?" is the worst grade you can give it.
Binary Tree's Program: (Updated Version)
Re: Evaluation, Suggestions, Comments
Quote:
Originally posted by Tec-Nico
I have finally came up with a rough draft of my Binary Tree program.
As I said before, this is a rough draft. This is not the final version.
Some of the details posted before were not thought by me, yet I thank them for when I program the Final Thing.
First... What does this program do?
This is an implementation of a Balanced Binary Tree in Visual Basic.
A Binary Tree is a data structure that provides great advantages when programming searches and other things. In this program I am showing the Binary Tree that would result from inputing certain Integer values (That is why some errors occur when you input strings or other values. Now it only supports Integer ordering, but I am thinking about programming it for any kind of data)
When you click on the node or you hover it with your mouse, you can see in the parenthesis the number of node it is. I know this is not proper and I will search for the number you give to erase. But in this version you cannot give the number inside of the node. I am sorry.. :(
I know guys you are commenting about it and I really like this. I like to have feedback and know what I should add to the final version (I am going to post better versions here, I should tell) And just to let you all know the last option means the program sucks... :p
I would like you guys to tell me if you find a Tree that is not balanced properly or if something weird happens. For example, I found out that if I erased the 7 element when introducing 1-20 the tree gets crazy.. (I ignore why and I must check it)
:) Thank you once again for your feedback...
Things Provided by the program:
1.- Node Structure
2.- Binary Tree Structure
3.- Adding Nodes to the Tree
4.- Searching Nodes to the Tree (I forgot to fire it with some command box.. :p Sorry)
5.- Erasing Nodes of the Tree
6.- Balancing the Tree
a) Most-Left Rotation
b) Most-Right Rotation
c) RR
d) LL
e) RL
f) LR
7.- Graphing the Tree
8.- Calculate Level, Left Height, Right Height, etc. Of a Node