2014年1月22日星期三

Week 3 - Object-Oriented Programming

    In my understanding, Object-Oriented Programming is a way, in the other word, a structure to write programs. And I think the easiest way to explain it is classes in Python. Instead of just writing functions and using functions in programs, we create our own classes, which can not only hold functions we write, but can also store data we need. When I wrote my program in the tutorial, I found that the code of the program was much more organized than just using functions. The OOP makes my codes much more readable. In lecture, I learnt about superclass and subclass which can save much time because we don't need to write duplicated codes any more which is another benefit of OOP. Using finished class is also quite easy, we don't need to memorize variables' name, and by calling methods, data stored can be easily modified.

没有评论:

发表评论