2014年1月23日星期四

Object-oriented Programming

The topic of this week is the Object-oriented programming, what we learned in the previous weeks. According to the information in the internet, Object-oriented programming (OOP) is a programming paradigm containing "object", which having data fields, and associated methods. The language what we are using now, Python, is the one of examples of OOP which is widely used in software engineering.

During the class, we figured out the important nouns, verbs, and adjectives from an article, which indicate the specific attributes and methods the new class should have. For every new class, we need to write a initializer method at the top, which is been called automatically whenever a new instance of the class is created. Attributes are created in it and we use "self" parameter referring to the object needed to initialized. After that, other methods are created according to what you want this class do.

The use of OOP provides us a great advantage that a complex work can be divided into parts and finished by different people, which encourages the teamwork in computer science and the result of combination of parts written by different person, who works on what they are good at, is always better.

Actually, "Class" was introduced in CSC108 as well while 148 gives me a deeper understanding. More complicated codes appear in the examples professor demonstrated and in order to follow the pace, I have attended the CSC108 review session last weekend and read the reading materials carefully. The fact is that pre-class reading is quite necessarily as most of points mentioned in class requires us to roughly know it previously. Compared with CSC108, more work needed to be done and more complex code I am expected to write.

Lab #1 and exercise #1 have been done in previous weeks. Those practices help me to get more familiar with what I learned during the classes and the teamwork ability is improved by labs. Everything goes fine up till now and I hope I can always do well in this course! >w<



没有评论:

发表评论