Saturday, 15 March 2014

Week 9

This week's lecture material was about the class BSTNode and the class BST. One challenging task this week was to complete Lab 8. In lab 8, we were asked to write four functions that essentially performs the same. The only difference between each functions was its location: we had to write one function in BSTNode(and no modification to BST), and, in the other file, we had to write the function in BST(and no modification to BSTNode) etc. Also, whether to use helper function or not was something that we had to figure out during the lab. During this procedure, my partner and I came up with the vague idea of what function must do in each case. But, it took many try and errors to know the precise way of coding. The big hint in this lab emerged after we understood the two different types of attributes(one of BSTNode and the other of BST). The tip I learned today is, when altering the object of the function (the case when the object the function is calling onto is of a newly defined class),  it is important to know the attributes and operations of that class before writing a code.

No comments:

Post a Comment