Object-oriented programming, also known as OOP, is a computer programming approach that represents abstract ideas and concepts as ‘objects’. I personally find this fascinating perhaps due to striking similarity between the normal flow of human thoughts and this programming paradigm; people like to think in terms of objects and now programs get to follow our lead! Things known as ‘classes’ within OOP encompass attributes, methods and variables which are all found to better describe an object. To put this more concretely, you may think of an object “blue jar” which is of class “Jar” then you can assign your blue jar a method to open it, another one to pour its contents, and so on. Your blue jar will have all the features a typical Jar has. I normally like to think of a class as a template which leads to the creation of an object allowing it to inherit that class’s properties; its attributes. In some cases there may even be sub-classes within a class forming what is known as a class hierarchy. This gives on a glimpse of the level of complexity within OOP which largely resembles our real world systems. It is worth mentioning that OOP is widely used across different programming platforms including Java, Python and PHP.
Thursday, January 23, 2014
Object-Oriented Programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment