Question: Lab 3 Tree Traversals 2/12/19, 9:57 AM Lab Binarv tree Prelab Tasks 1. Review what we learned about tree and binary tree 2. Read and

 Lab 3 Tree Traversals 2/12/19, 9:57 AM Lab Binarv tree Prelab

Lab 3 Tree Traversals 2/12/19, 9:57 AM Lab Binarv tree Prelab Tasks 1. Review what we learned about tree and binary tree 2. Read and understand dtnode,h 3. Read d_tnodelh and understand functions: buildTree, depth, deleteTree, clearTree, countLeaf Lab Tasks 1. This lab task will count one child nodes in a tree: Declare and define the function countOneChild in a file named countOneChild.h. The function will counts the number of interior nodes in a binary tree having one child Write a program in a file named Lab03_01.cpp that will test the countOneChild function for Tree 1. [Hint: mimic buildTree function from "dtnodel.h" to allocate nodes for Tree 1.] .Run your program and print out the outputs 2. This lab task will find a maximum value in a binary tree Declare and define the function max in a file named max.h that will return the maximum value in a tree Write your program in a file named Lab03_02.cpp to display the maximum value in the integer tree created by the function buildIntTree) for Tree 2 o Using buildTree function in d tnodelh as a model, implement a function buildInt Tree function that builds the integer tree for Tree 2: o The tree in this question is binary tree not binary search tree. You need to use "d tnode.h" to declare tnode objects Run your program and print out the outputs What to Turn In Hand in all source codes (except provided d tnodel h and d tnode.h) and sample outputs to the instructor http://faculty.salisbury.edu/-ealu/COSC320/Labs/Lab_03_binaryTree.htm Page 1 of2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!