Thursday, 23 January 2014

Object-Oriented Programming

     From what I have learned in class thus far, object-oriented programming (or OOP) is a programming paradigm, which simply means style of programming. How one would implement OOP in python (or another programming language) is through the creation of "objects" which contain data, but may also operate using it's stored information.

     It was not until "lab01" that I really understood this concept. During this lab we were asked to analyze a word problem and from that, keep note of the major nouns, verbs and adjectives. At first, I thought to myself, "How can this possibly help me in writing code?"I then thought about how in the real world, we are surrounded by different objects of which have various properties and functions. As a result, I knew that each noun would be an object for the program, and each verb and adjective would describe what methods I would have to implement for my newly created object.

     In my previous computer science course; CSC108, my peers and I mostly used a different style of programming called "procedural programming" which mostly means how it sounds: to program by procedure. This programming paradigm focuses on writing functions that operate on data taken through it's parameters. Now, coming into CSC148 I cannot speak for the rest of my peers when I say that object oriented programming is almost Aladdin-like to me (get it? A whole new world, lame, I know). This new style of programming goes one step further beyond my knowledge from CSC108 and teaches me (and the rest of my fellow beginner programmers) how to kill two birds with one stone; creating an object with both stored data and functionality.  

No comments:

Post a Comment