Domain Registration and Web hosting

Buy Unlimited Linux Hosting Plan - Get .COM and .IN.NET Domains Free Hurry !!!!! http://www.host4win.com/

Sunday, August 24, 2008

Basic OOPs Concepts For Fresh Developers

OOPsObject Oriented Programming System
Object-oriented programming (OOP) is a programming paradigm that uses “Objects “and their interactions to design applications and computer programs.

There are different types of OOPs are used, they are
  1. Object
  2. Class
  3. Data Abstraction & Encapsulation
  4. Inheritance
  5. Polymorphism
  6. Dynamic Binding
  7. Message Passing

1) Object : Object is the basic unit of object-oriented programming. Objects are identified by its unique name. An object represents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data.
An Object is a collection of data members and associated member functions also known as methods.
For example whenever a class name is created according to the class an object should be created without creating object can’t able to use class.
The class of Dog defines all possible dogs by listing the characteristics and behaviors they can have; the object Lassie is one particular dog, with particular versions of the characteristics. A Dog has fur; Lassie has brown-and-white fur.
2) Class :
Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects become functions of the class and is referred to as Methods.

For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects. In this context each Car Object will have its own, Model, Year of Manufacture, Colour, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class.No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.
3) Data abstraction & Encapsulation : The wrapping up of data and its functions into a single unit is called Encapsulation.
When using Data Encapsulation, data is not accessed directly, it is only accessible through the functions present inside the class.
Data Abstraction increases the power of programming language by creating user defined data types. Data Abstraction also represents the needed information in the program without presenting the details.
Abstraction refers to the act of representing essential features without including the background details or explanation between them.
For example, a class Car would be made up of an Engine, Gearbox, Steering objects, and many more components. To build the Car class, one does not need to know how the different components work internally, but only how to interface with them, i.e., send messages to them, receive messages from them, and perhaps make the different objects composing the class interact with each other.
4) Inheritance :
Inheritance is the process of forming a new class from an existing class or base class.

The base class is also known as parent class or super class, the new class that is formed is called derived class.
Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming.
It is classifieds into different types, they are
  • Single level inheritance
  • Multi-level inheritance
  • Hybrid inheritance
  • Hierarchial inheritance
5) Polymorphism :
Polymorphism allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.

Poly a Greek term ability to take more than one form. Overloading is one type of Polymorphism. It allows an object to have different meanings, depending on its context. When an exiting operator or function begins to operate on new data type, or class, it is understood to be overloaded.
6) Dynamic binding :
It contains a concept of Inheritance and Polymorphism.

7) Message Passing : It refers to that establishing communication between one place to another.

27 comments:

DataDiary.com said...

thanks for your help man,,,,

CSE NON STOPPERS said...

very useful thanks boss....

Unknown said...

Very nice one.


Thank You.

AK said...

Nice blog..
You can also refer Oops concepts Interview question

Abhay Kumar said...

Thanx a lot. It was of great help !!

Unknown said...

Hi, Nice description about Oops Concepts.Thanks, its really helped me......

-Aparna
Theosoft

Unknown said...

Thanx for ur help.

Deepesh said...

It's really simple n easy to understand (Y)

Unknown said...

Excellent Tutorial, Of Course Dynamic Binding the combination of Inheritance and Polymorpshim in which Supe Class or Interface creates the object or reference, handles the members in the belo class. For OOPS Concepts in Java with Real Time Example

Ahishek kumar said...

thanks for help me it is realy helpful for me

Vajahath Ahmed said...

This is awesome!!

Furqan said...

Great knowledge, nice sharing

Unknown said...

thanx a lot...... it is a nice explanation about oops concept....

Unknown said...

Here is the best link I found for oops concepts. Go for this link if you really want to learn everything in OOPS.
http://oopsall.blogspot.in/

Ugale Navnath said...

Thank for your guidance & it is very useful in .....

satya said...

its wonderful..

For more details about OOPs and real life example please see
http://oopsconceptss.blogspot.in/2014/11/what-is-oops.html


OOPs Concept

RAJASHEKAR said...

GOOD

Priya Sharma said...

A very helpful and informative post for everyone to gain the knowledge about the object oriented programming. Thanks for posting, and hope to gain more information through your post.

Digvijay Chaudhary said...

This is wonderful blog. I like to read articles in this blog. Hope you would also like to see Features of Object Oriented Programming

Unknown said...

Nice blog,it was really informative and easily understandable..Thanks for sharing..Keep update selenium training in velachery
best selenium training in chennai

Suba said...

Interesting blog post. This blog shows that you have a great future as a content writer.

Java Training in Chennai
Java classes in chennai
core Java training in chennai
Best JAVA Training in Chennai
JAVA Course
Advanced java training in chennai

Unknown said...

Knowledge sharing article.Very useful for the beginners with basic tutorial notes.
iphone service centres in chennai
iphone service center velachery
iphone service center in vadapalani
iphone service center in porur

riyaz said...

Your info is really amazing with impressive content..Excellent blog with informative concept.




Android Training Institute in Chennai | Android Training Institute in anna nagar | Android Training Institute in omr | Android Training Institute in porur | Android Training Institute in tambaram | Android Training Institute in velachery



Maridev said...

Gear your career with the excellent DevOps training in Chennai for freshers and students, and Tech Professionals of any field from Infycle Technologies. Also, learn other technical courses such as Cyber Security, Digital Marketing, Python, Java, Big Data Hadoop, Selenium, AWS and Azure, Mobile App Developments with complete practical methods. Call 7504633633 to get more info and a free demo for getting the best placements in the MNC's with the best salary packages.

Pranisha said...

We came up with a great learning experience of Azure training in Chennai, from Infycle Technologies, the finest software training Institute in Chennai. And we also come up with other technical courses like Cyber Security, Graphic Design and Animation, Big Data Hadoop training in Chennai, Block Security, Java, Cyber Security, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with great learning experience with outstanding training with experienced trainers and friendly environment. And we also arrange 100+ Live Practical Sessions and Real-Time scenarios which helps you to easily get through the interviews in top MNC’s. for more queries approach us on 7504633633, 7502633633

saibabahistory said...

Thanks for sharing this post
Sai Satcharitra Pdf
Sai Satcharitra Telugu Pdf
Sai Satcharitra Tamil Pdf
Sai Satcharitra Hindi Pdf
Sai Satcharitra Bengali Pdf
Sai Satcharitra Kannada Pdf
Sai Satcharitra Marathi Pdf
Sai Satcharitra Malayalam Pdf

IT Education said...

Thanks for this blog . keep sharing Java Course in Pune