Thursday, February 12, 2015

Object-Oriented Programming

Yet another week of hard work has ended. The good news is that next week is reading week.

For the past few weeks, most of our tutorials and lectures are focus on object-oriented programming. From a point of view of a student who has not touched a lot of programming and computer science before university, I can honestly say that I have learned at lot in the past weeks. Although I have touched a bit of object-oriented programming in CSC108, it is not enough for me to get through this course with just that. Some new concepts that was covered was knowing how to translate the question description into code. This part I struggle a bit at first in the beginning of the course, but as I move on to do more questions, I starts to get better at it. Also, we also learned how to write special methods for class such as __init__, __eq__, __str__, __repr__ and __contains__. Some of these special methods I learned in CSC108, so I had no problems writing them, though some of them I have know learn and understand such as __repr__ because when it was first shown to me, I did not know what is the use for __repr__. There is also something else that I found to be really important, which is know what to implement in the parent class and its children class. I have honestly say that in the process of writing assignment 1, I struggled quite a lot in deciding what to put in the parent class and its child class. Often times I would ask myself "what is the point of writing a generic class I could write most of them in one class". Later I understood that, writing a parent class makes it easier or more faster in implementing a new subclass for that superclass, since a parent class would contain everything a generic subclass would need, so I won't have to repeat everything if I have to write a similar class. Though object-oriented programming is essential, I found recursion to be more interesting. I cannot wait to learn more about recursion.

See you in a week.

No comments:

Post a Comment