My Lab assignment just corrupted and I hadn't finished debugging my errors. I last worked on it two days ago. I can't remember what I had after a week of debugging and tweaking. my assignment was due last night, but my professor gave me a extension for a few hours (that is almost up and I am nowhere! Its like my brain is fried for finals!) Any and all help .. please! here is the info.... code given:
and documentation [quote]Finish the code for Lab10a.cpp . You will write code for the Same function which will return true if the values of the elements of the vector that is passed to it are the same read both forwards and backwards. If they are not the same in both directions, it will return false. Don’t change anything in the main function or add any additional functions to the program. Output should match iVector1 same order, iVector2 Not same order, sVector1 same, and sVector2 not in same order. and then the second part: Trees - Part B (25 points) Please complete the program below exactly as described. Don’t add anything extra to it (methods, extra variables, features, etc.) and don’t leave any features described below out. You are going to write a function that will use recursion to count the number of nodes in a tree. First use the code on page 1141-1142 to develop the IntBinaryTree class (For the member functions, you only need the code for the constructor and the insert member function). Your main program will call a public member function called numNodes. This function will then call a private member function, countNodes, that will use recursion to count the number of nodes in the entire tree:
Code from pages 1140-1142: InBinaryTree.h
|
|
|