2014年1月22日星期三

csc148 SLOG1: Object-Oriented Programming

    We learnt about object-oriented programming (OOP) in these weeks. I had a hard time with it and I don’t think I was following the lecture well. I tried to note down whatever I understood or just heard in class and connect them after class. Though, I still got lost when asked to create a program using OOP method in the first tutorial. I searched it on Google at once, but at that time it was too abstract for me. Luckily, under the help of my TA and my partner, I finally found a breakthrough point that helped me understand: In old times, if I define a function, I could call other functions to help so that I wouldn't duplicate codes. Similarly, in OOP, classes are connected and can help each other during the execution process.
    After that, I soon found that using OOP is better than calling other functions. Classes can store messages and have their own properties. They can also inherent characteristics from other classes and at the same time have their own ones. Later, I practiced coding using OOP at nights. My mind is really clear because things get easier under OOP. I also searched it on Google the second time and learnt more on Wikipedia. For example, its Polymorphism. Of course, I am not going to stop here.