In the week 8, I learned a wrapper class for list in the lecture. In the lecture, professor used the example of 'Linkedlist' which use recursion in its method. And I have learned how to trace the recursion. I really like this part because after tracing a recursion function, I always can surprised by the result and I will know how this recursion function work. Professor always give another recursion example - draw turtles.This is very helpful for me to understand how the recursion work. And I think this week's content is easy to follow and I think I'm able to tracing a recursion function.
In this week's lab, I have written a lot of method about Linkedlist. And this lab's goal is to make me explore and understand inheritance.I have learned how to build a class and how to use subclass.
In this lab, it's my first time to use unittest framework to test my class. Then I know how to determine good test cases and use unittest.However, I think I still need some practice to remember the style of unittest framework.
In short, in this week, I start to learn recursion function and practice on building class and use unittest to test my code.
I was so confused about the wrapper class at first, too. But I figure out the benefits of it later.
回复删除