/**************************************************** Ed Yakabosky CSE 120 Section 002 This is the third homework program for CSE 120. In this program, the user enters an array which generates a binary tree. The maximum path of the binary tree is then found. input: array of integers. output: maximum path. ****************************************************/ #include #include "MaxTree.h" int main() { int max; int array1[15] = {4,2,5,1,8,3,20,0,0,0,0,0,0,0,0}; MaxTree tree1(array1); int array2[31] = {5,3,1,9,7,8,5,7,9,5,4,6,8,2,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; MaxTree tree2(array2); int array3[31] = {7,4,6,3,5,1,4,8,2,4,3,4,9,2,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; MaxTree tree3(array3); int array4[31] = {7,4,6,3,5,1,4,8,100,4,3,4,9,2,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; MaxTree tree4(array4); max = tree1.getMaxValue(); std::cout << "The max value for tree1 is " << max << std::endl; max = tree2.getMaxValue(); std::cout << "The max value for tree2 is " << max << std::endl; max = tree3.getMaxValue(); std::cout << "The max value for tree3 is " << max << std::endl; max = tree4.getMaxValue(); std::cout << "The max value for tree4 is " << max << std::endl; return 0; }