Principles of OOP: Polymorphism


It appears that people aren’t the only ones that use words with two meanings.

This week in Data Structures and Algorithms my classmates and I have been exploring Polymorphism.

Polymorphism is one of three principles that define Object-Oriented Programming (OOP); the other two are Encapsulation and Inheritance.  If you don’t know what OOP is, it’s the rage of the high-level coding community.

Obviously when we’re talking about code we’re not discussing physical objects, but code does reflect real life in the sense that in order to cultivate the digital landscape you have to be able to classify the “something that the data represents; and how it’s organized.

The outcome of the work programmers do to classify something is the development of a model that can be used to reproduce the group in similar design.

So in technical terms the model that’s created is called a class, and each reproduction is called an object.

Defining groups of data in this way makes it easier for programmers to interact with data and use it to produce desirable output.

Polymorphism is a fancy word that describes OOP’s unique ability to treat objects that were produced from different classes as though they were the same type.  To accomplish this feat these different classes would need to be derived from the same base class; but that’s a subject for a different day.

OOP is an incredibly complex subject, but its application in software development makes it a fascinating topic.





Join the fray...

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s