Monday, 16 February 2015

summary of Object-Oriented Programming concepts

Talking about Object_Oriented Programming, I would like to say that almost everything, such as objects and classes, that we have learned though this course except recursion helps us understand  the Object_Oriented Programming well, which is short for 'OOP'. OOP is the way of programming in order to design the application more focusing on using objects rather than logic. In Object_Oriented Programming, we don't care much about how the logic goes between input and output, what we mainly care about is the objects that were mentioned in this application.
I remembered that at the beginning of this course, we were learned abstract data types (ADTs) in python including classes, attributes, methods, etc. According to the course notes,  "an ADT speci es the intended meaning of the data it stores, and the operations it provides on that data". The stack is an typical example explaining what we basically do with ADTs  with some general features of ADTs. A stack, obviously is the object and pop, push and is_empty are methods used to manipulate the stack. Also in our first assignment, we use OOP concepts  to make a game with five classes. Our first step is always to find out objects and operations needed by this object.
Inheritance is also a concept which is important and beneficial to understand OOP. Sometimes, we only have general features which does not satisfy some specific requirements. Employee, as an example that was taught in class, is the general object ( parent class). However, we have different kinds of employees under that parent class like hourly employee and salaried employee, which are named child classes used to implement the parent class. As a result, hourly employee and salaried employee share the same features as employee but have their own attributes on the other hand. This method is so helpful so that we don't need to overwrite the same code under a class.
In a conclusion, understanding Object_Oriented Programming concepts is pretty important to us because it is the basic stuff we need to know in order to make a further move into computer science. After I summarize the OOP concepts by looking over the whole thing from the course notes, I feel like this part of knowledge is much clearer to me. If we have something not familiar with, reading course notes over and over again might be a good way to get through.

No comments:

Post a Comment