Join Dotnetcodes DotnetCodes.com is online Discussion Forum for Software professionals . It lets you find friends around the world and Create professional network that share similar interests as you. Get help on ur projects by industry specialists. Also get answers to all ur technical/placement related querries.Get an edge over others.
Already MemberClick here to login
ASP.net MVC Interview Questions Answers Interview Questions
Get Started Developing for Android Apps with Eclipse Articles
Serial Number in SSRS Articles
.Net framework 4.0 Interview Questions Answers Interview Questions
SQL server reporting services Interview Questions (SSRS) part 1 Articles
Whats New in ASP.NET 4.0 Part 2 Articles
How to Print a Crystal Report direct to printer Articles
Difference between Encapsulation and Abstraction Interview Questions
Explaining SDLC -System Development Life Cycle Articles
Html5 interview questions and answers Interview Questions
SharePoint 2010 interview Questions Answers Interview Questions
Infosys Interview Questions Interview Questions
Dynamic Menu using HTML List Tag and CSS in ASP.Net Articles
Populate or bind Dropdownlist in Asp.net using Jquery and Json Articles
ASP.NET MVC Overview Interview Questions
Submit Articles | More Articles..

Object-Oriented programming (OOP)

Posted By: [email protected] On:6/30/2010 12:56:56 AM in:Articles Category:ASP.NET Hits:2188
In this article, Ill take a look at whats OOPs and what are its features.

     Object-Oriented programming (OOP) is a computer science term used to characterize a programming language that began development in the 1960�s. The term �object-oriented programming� was originally coined by Xerox PARC to designate a computer application that describes the methodology of using objects as the foundation for computation. By the 1980�s, OOP rose to prominence as the programming language of choice, exemplified by the success of C++. Currently, OOPs such as Java, J2EE, C++, C#, Visual Basic.NET, Python and JavaScript are popular OOP programming languages that any career-oriented Software Engineer or developer should be familiar with.

     OOP is widely accepted as being far more flexible than other computer programming languages. OOPs use three basic concepts as the fundamentals for the programming language: classes, objects and methods. Additionally, Inheritance, Abstraction, Polymorphism, Event Handling and Encapsulation are also significant concepts within object-oriented programming languages that are explained in online tutorials describing the functionality of each concept in detail. 

Class

A Class is a user defined datatype which contains the variables, properties and methods in it. 'A class defines' the abstract characteristics of a thing (object), including its characteristics and the thing's behaviors . One might say that a class is a blueprint or factory that describes the nature of something. For example, the class Dog would consist of traits shared by all dogs, such as breed and fur color (characteristics), and the ability to bark and sit (behaviors).  Collectively, the properties and methods defined by a class are called members.

Method

     Method is a set of procedural statements for achieving the desired result. It performs different kinds of operations on different data types. In a programming language, methods (sometimes referred to as "functions") are verbs.

Inheritance

     Inheritance is a process in which a class inherits all the state and behavior of another class. this type of relationship is called child-Parent or is-a relationship. "Subclasses" are more specialized versions of a class, which inherit attributes and behaviors from their parent classes, and can introduce their own.

Abstraction

     Abstraction is simplifying complex reality by modeling classes appropriate to the problem, and working at the most appropriate level of inheritance for a given aspect of the problem.

Encapsulation

     Encapsulation conceals the functional details of a class from objects that send messages to it.

     Encapsulation is achieved by specifying which classes may use the members of an object. The result is that each object exposes to any class a certain inteface ï¿½ those members accessible to that class. The reason for encapsulation is to prevent clients of an interface from depending on those parts of the implementation that are likely to change in the future, thereby allowing those changes to be made more easily, that is, without changes to clients. For example, an interface can ensure that puppies can only be added to an object of the class Dog by code in that class. Members are often specified as public, protected or private, determining whether they are available to all classes, sub-classes or only the defining class. Some languages go further: Java uses the default access modifier to restrict access also to classes in the same package,C# and VB.Net reserve some members to classes in the same assembly using keywords internal (C#) or Friend (VB.NET), and Eiffel and C++ allow one to specify which classes may access any member.

polymorphism

     Polymorphism allows the programmer to treat derived class members just like their parent class's members. More precisely, Polymorphism in OOP is the ability of objects belonging to different data types to respond to calls of methods of the same name, each one according to an appropriate type-specific behavior. One method, or an operator such as +, -, or *, can be abstractly applied in many different situations.

comments powered by Disqus
User Profile
Piyush Kumar
.Net Programmer
New Delhi , India
Email :You must Log In to access the contact details.
Latest Post from :[email protected]
Normalization
View: 1293 | Submitted on: 7/28/2010 11:37:14 PM
What is MVC?
View: 1323 | Submitted on: 7/26/2010 5:02:22 AM
Deleting Duplicate rows from a table
View: 1831 | Submitted on: 7/14/2010 1:50:14 AM
How To convert a Number into Word
View: 3429 | Submitted on: 7/14/2010 12:50:25 AM
Serial Number in SSRS
View: 12934 | Submitted on: 7/12/2010 6:25:55 AM
Submit Articles | All Post of This User..

All rights reserved to dotnetcodes. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
Best viewed at 1024 x 768 resolution with Internet Explorer 5.0 or Mozila Firefox 3.5 or Google Crome and higher