Friday, March 13, 2015

Week#9

For CSC148,  this week we started the topic of mutation (eg. LLNode and LinkedList) and we took term test 2 on Wednesday.

Class Tree, BTNode and LinkedList were tested in midterm 2. As far as I'm concerned, the methods written in the test for BTNode and LinkedList were similar to what we wrote in the lab. As long as we understand the recursion and basic methods written in the classes, the methods for the test would be easily completed.

On the other hand, LinkedList would be the first class that we encountered with mutation. 
LinkedList init
The nodes in the LinkedList are the nodes in LLNode class. As a result, self.front would be continued changing while value and nxt change. (insert_before would be a good example to explain this.)



 

No comments:

Post a Comment