Wednesday, 22 January 2014

Object Oriented Programming

Well this week, we talked about object oriented programming or OOP and I guess it’s best if I described what OOP is. OOP is simply a model or a way of approaching problems by making distinct objects which pertain specific attributes the programmer wants to manipulate and or keep track of. In doing so, one can essentially create many object to manipulate around in order to perform a desired, useful function. For example if one would like to manipulate fractions, one might make a new object called Fractions with instance variables that represents the numerator, the denominator and perhaps an integer for mixed fractions. Creating a constructor class will allow the programmer to reuse and recycle the code many times to create many objects of type fractions to manipulate around.

As an avid gamer, one can appreciate OOP when knowing virtually everything in video games can be represented as an object. This includes the variety of units, terrain, environment and others. Another reason why OOP is useful is error correction and or making something easier to modify later on. By simply changing the constructor class of the object, one can change the properties of the same object called throughout the whole program, which makes errors easier to solve.


As for the concepts and techniques learnt so far about OOP, it’s nothing really new compared to high school other than the fact that I’m learning it in Python for the first time. My first programming experience came from Java and as such I’m constantly analyzing the similarities and differences between the two languages. Especially when it comes to the topic of hierarchy and inheritance, being able to understand certain things due to having experience coding in Java is quite helpful knowing how this topic was quite confusing when I first learnt it back in high school. Although I can tell that the pace of this course is very fast compared to high school and it will only be a mater of time before it goes beyond what was taught in high school. 

No comments:

Post a Comment