static void Main(string[] args) { Tree tree = new Tree(); tree.AddNode(6); tree.AddNode(8); tree.AddNode(4); tree.AddNode(2); tree.AddNode(7); tree.Search(4); }
static void Main(string[] args) { Tree tree = new Tree(); bool isStillUsingTree = true; do { int action = UserInterface.MainMenu(tree.numberOfLeaves); if (action == 1) { tree.AddNode(); } else if (action == 2) { tree.SearchForNode(); } else if (action == 3) { isStillUsingTree = false; } }while (isStillUsingTree == true); }