Object-Oriented Programming

The concepts of Object Oriented Programming are the basis for many of today's programming languages. The core concept within Object Oriented Programming is the concept of an Object. An Object is a collection of data and the methods(functions) that operate on it. The basic idea behind an Object Oriented Programming language is to combine into a single unit both data and the methods (functions) that operate on the data. An Object's method (function) provides the only way to access data. Thus data is hidden and safe from accidental alteration. Data and methods are encapsulated into a single unit. Data Encapsulation and data hiding are the key terms for describing an Object Oriented Language.


Object Oriented Programming - Interview Questions and Answers

An object within Object Oriented Programming is something that models a real world entity. The real-world objects share two characteristics: They all have State and behaviour . Software objects are conceptually similar to real-world objects, such as they too have state and behaviour . An object stores its state in fields (variables) and exposes its behaviour through methods (functions). The methods operate on an object's internal state and serve as the primary mechanism for object to object communication.


What is Object Oriented Programming C# VB.Net Asp.Net Interview Questions and answers

In the above example you can see a real world entity (CAR) is related to Object Oriented Programming. Here Car is an Object which has properties (member data) like Steering, Breaks, Tyres etc. and functions (methods) like forward(), backward() etc. Here we can understand that Car is an Object which combine the properties and functions into a single unit and these functions operate with the help of properties.

.Net Interview Questions and Answers

The .NET Framework is built completely around the concepts of Object Oriented Programming. It supports all the features of an object-oriented programming language including encapsulation, inheritance, and polymorphism.