Gemstones — OOPS Concepts

Ruchira More
3 min readMay 22, 2018

Hello Friends,

After long time, Ruchira is back with her little bag of Gemstones.

This time, I would like to share Series of “Gemstones” with you all. I hope all these Gems will help you in your studies.

Why I am starting this??..🤔 Great thoughtful question..

This series is for my dear friends who are at first step of Programming.

Following information will help you to get quick look on Programming with meaningful examples.

So let’s start…

What I am going to share..👐?

Here, I am sharing first and very basics related to programming.

Every programmer have to clear about these things. Those are OOPS Concept..

OOPS Concept means what?

OOPS stands for Object Oriented Programming Concept. In OOPS, Objects are the most important part of program.

We are going to know Object Oriented Programming Concept.

OOPS Concepts means Object Oriented Programming principles :

  1. Class
  2. Object
  3. Inheritance
  4. Polymorphism
  5. Abstraction
  6. Encapsulation
  7. Association
  8. Aggregation
  9. Composition

OOPS concepts — types of pillars :

Major Pillars — Inheritance, Polymorphism, Abstraction, Encapsulation

Minor Pillars — Association, Aggregation, Composition

To understand OOPS concept, let’s relate with Human Body.

Class

A class is group of similar entities.

Gemstone — Class

Example:

Human Body is Class. For functioning (like walk, talk) it has Body Parts (like hands, legs). For functioning Class defines its Properties and its Functions.

Object

An object can be define as a instance of a class.

Gemstone — Object

Example:

Abhishek is an Object of Human Body Class. We can create many objects of an Main Class, like Gita, Kamal, etc.

Inheritance

Class can have subclasses. And subclasses can inherit the properties and functions of Main class.

Gemstone — Inheritance

Example:

In our case Human Body is Main Class. On gender basis if we categorise Main class then there will be two Sub-Classes like Male and Female. As subclasses inherit the most of the properties from Main Class. Same here, Body Parts(like legs, hands) and Functionalities(like Walk, talk) are get inherited in subclass of Main Human Body Class.

So, till this, we have Main Class “Human Body” with properties and functionalities. Class have two subclasses Male and Female. Each class has an objects. Like here Male has Abhishek and Female class has Gita, Kamal.

Abstraction

Provide only required things and hide other details.

Gemstone — Abstraction

Example:

If we go little deep. If we observe internal working of human body, Heart is property(Body Part) and Beats are function. If we choose only executable functionalities and properties, then we will keep Heart as an Abstraction Factor. Hiding inside mechanism.

Encapsulation

Binding of properties to function.

Gemstone — Encasulation

Example:

Consider, the human body parts, two legs are bind together to walk. Same way, fingers bonded by palm for holding things. Here, holding is function and fingers are Properties.

Polymorphism

Ability to take more than one form. An operation may exhibit different behaviours in different instances.

Gemstone — Polymorphism

Example:

In Main Human Body class, Male is subclass named Abhishek. He behaves different in different situations. In office, in home, with friends everywhere Human behaviour is different.

That’s it..✌️
Thanks for reading!!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ruchira More
Ruchira More

Written by Ruchira More

Software Developer, Writing Tech+Life and much in between | Grow With Flow… Love Life…😊

No responses yet

What are your thoughts?