Please enable Javascript to correctly display the contents on Dot Net Tricks!
 
Coding is Rhyme
Handy Tricks For Beginners & Professionals
OOPS - Tutorial, Article, Archive, Pdf, Handy Tricks, Code Snippets, Training, Reference Manual, Association, Aggregation, Data Abstraction, Data Hiding, Object, Class, Structure, Constructor, Inheritance, Polymorphism, Interface

Object-Oriented Programming Concepts

Posted By : Shailendra Chauhan, 15 Feb 2011
Updated On : 10 Jul 2012
Keywords : object oriented programming concepts pdf,oop concepts, oops in c sharp

OOP is a design philosophy. It stands for Object Oriented Programming. Object-Oriented Programming (OOP) uses a different set of programming languages than old procedural programming languages (C, Pascal, etc.). Everything in OOP is grouped as self sustainable "objects". Hence, you gain re-usability by means of four main object-oriented programming concepts.Below are object oriented programming concepts :

  1. Object

    Object is representative of the class and is responsible for memory allocation of its data members and member functions.An object is a real world entity having attributes (data type) and behaviors (functions).

    An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object behavior. For example, the hand can grip something or a Student (object) can give the name or address

  2. Class

    Class is a data structure that contains data members (constants files, events), member function methods, properties, constructor, destructor, indexers and nested type.Basically

    1. It is a user defined data type.

    2. It is a reference type.

    3. Infact class is a tag or template for object.

  3. Encapsulation

    Encapsulation is a mechanism of binding the data member & member function into a single unit known as class.Encapsulation provides a way for abstraction.In OOP the encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attribute and properties to provide its indented functionalities to other classes.

  4. Data abstraction

    Data abstraction is a mechanism to provide the essential features without describing the background details. Means provide the functions to access the hidden (private) data.

    The importance of abstraction is derived from its ability to hide irrelevant details and from the use of names to reference objects. Abstraction is essential in the construction of programs. It places the emphasis on what an object is or does rather than how it is represented or how it works. Thus, it is the primary means of managing complexity in large programs.

  5. Data Hiding

    Data hiding is a mechanism to hide the internal structure of an object from rest of the program.In a class private members are hidden from the rest of the program, hence it supports data hiding. Data hiding is also a way to implement data abstraction.

  6. Polymorphism

    Polymorphism means one thing in many form.Basically polymorphism is capability of one object to behave in multiple ways. Example : A man role changes at home, college, and outside the home. There are following types of polymorphism :

    1. Static polymorphism(compile time) :It is achieved using function overloading and operator overloading.

    2. Dynamic polymorphism(runtime time) : It is achieved using function overriding means using virtual function.

About the Author
Hey! I'm Shailendra Chauhan author, developer with more than 5 years of hand over Microsoft .NET technologies. I am a .NET Consultant, founder & chief editor of www.dotnet-tricks.com and www.dotnetinterviewtricks.com. I am author of books ASP.NET MVC Interview Questions and Answers & LINQ Interview Questions and Answers.
I love to work with web applications and mobile apps using Microsoft technology including ASP.NET, MVC, C#, SQL Server, WCF, Web API, Entity Framework,Cloud Computing, Windows Azure, jQuery, jQuery Mobile, Knockout.js, Angular.js and many more web technologies. More...
 
 
Recommended Articles!
 
Subscribe & follow Us
 
Creative Commons License
Dot Net Tricks is licensed under a Creative Commons Attribution 4.0 International License.
Free .NET Interview Books
 
Learn In Hindi
Browse By Category
 
Recent Articles
 
Popular Articles
 
Like us on Facebook
 
Featured AD