Thursday, January 23, 2014

Object-Oriented Programming

The first topic is going to be about Object-Oriented Programming, or OOP in short.

OOP is a style of computer programming. The main focuses on OOP is, as its name implies, object. During last semester's CSC108, we learned that a program processes an input (data) in a logical procedure and produces outputs (data). However, OOP looks at the task in a different way, instead of finding ways to 'write' correct procedures, it cares more about what is the important object in the program and what does the object do. It is like focusing on a sentence in a different way, a normal program looks for the verb, and OOP looks for its noun. Usually, a class is a collection of objects, and the things the objects do are methods.

Some Pros:
  •  It is organized and easier to understand the program if constructed carefully, since you separated it into different classes.
  • We can reuse the classes that have been created in our new class. (Also called "inheritance".)
  • We can reuse names for methods that functions differently in different classes, no more naming problems:D (Also called "polymorphism".)

Object-Oriented Programming sounds like a new thing, but it actually works pretty well with what I've learned in the first semester. Although I haven't had many experience with it. The part that most appeals to me about OOP is its well organization, it involves lots of thinking before actually writing the program, and that's why I like it! I can have a better view of the program and know where to check if there's a problem. Hopefully I will learned more about it as the semester goes on.


Here are some links I found useful/interesting while writing this post:
Object-Oriented-Programming-Concepts
How I explained OOD to my wife




1 comment:

  1. Demonstrate in your future posts a synthesis of one or more concepts in the topic.

    ReplyDelete