Thursday 23 January 2014

Introduction to Object-Oriented Programming

In today's day and age, technology has become a vital part of society. We now have many different platforms, devices and programs that help improve the quality of our work and our lives. The study of computer science allows us to understand what really lies behind the technology we have today and contribute to further advances. 

After going through CSC108 last semester, I have learnt the very basics of Python through fiddling about with functions, loops, lists, strings, dictionaries, tuples etc. and learnt that programming is a very systematic approach to solving a problem.

Now in CSC148, terms like subclass, superclass, encapsulation, inheritance are being taught. It is the introduction to Object-Oriented Programming. I've learnt that objects are stuff like strings, lists, dictionaries, functions and user defined classes. Objects can also be relatable through inheritance, subclasses and superclasses. Basically, objects are just concepts that contain organized information such as attributes and methods. Object-Oriented Programming allows us to manipulate these objects however way we want to solve a greater problem. The concept of Object-Oriented Programming is sort of like building a structure. The different objects you create in attempt to solve a problem are like the bricks of the structure. You then link these objects together by writing them into your program which resembles putting the bricks of a structure together. 

The way objects can be created through inheritance reminds me of human life which i find really interesting. As a human, you inherit certain traits and behaviour from your parents. In the same sense, objects are able to inherit certain attributes and methods from other objects. Yet, there are objects that are completely different from each other but they are still ultimately objects like how one human can be completely different from another but they are both still humans. Plus, inheritance makes things easier for programmers, it allows us to save on unnecessary code repetition. 

The concepts I have learnt these past 2 weeks are some of the foundation of the study of computer science and hence of high significance to an aspiring computer scientist such as I.