Tuesday, 22 October 2013

Basic Recursion & Inheritance (Week of Sept 30th)

The last time I took computer science course is in Grade 11. Taking CSC148 is a challenge for me this year; especially I never learned how to use Python! This week we learned more about recursion and test cases. Recursion is still pretty new to me, and on top of list comprehension, I found recursion a pretty hard topic in computer science. When I am working on a question that requires recursion, I usually have the right idea, but I can never implement it in the correct way. I think if I want to master in recursion, I should probably read more examples on the internet, as well as doing more exercise. Hopefully I will get used to recursion after a while.

On the other hand, making test cases is pretty easy! The main concern for me is to pick the right test case; implementing the code for test case isn't too hard. Speaking of which, the exercise for this week is pretty easy too! We have to create classes for some quadrilaterals for part (a) (in which some of them are supposed to inherit attributes and method from superclass). And for (b), we are supposed to write test case for the four quadrilateral classes and see if they works properly. Hopefully I did it fine.

No comments:

Post a Comment