FAQ 1 – What is Object Oriented Programming?


0

We deal with objects everyday. There are basically two kinds of objects namely, objects with life and without life. Animals and Human beings form living objects whereas Buildings and Furniture are objects without life. Each of these objects includes certain properties and you can also perform certain actions which ultimately describes their behavior. Object Oriented Programming mainly involves representing objects in a programming language and using them appropriately.

Before learning more about objects you should be aware about the concept of classes. A class represents group of objects of similar kind. Moreover, a class is considered as a template for creating multiple objects with similar features. For example, you can define Hard Disk, Motherboard, CD-ROM Drive and DVD-ROM Drive in a class called Computer. Here each of the computer spares are called as objects. Therefore, you can say that an object is an instance (copy) of a class. In the above case, Hard Disk and Motherboard are an instance of the class Computer and hence they are termed as objects.

All Object Oriented languages shares common set of features such as Encapsulation, Inheritance, and Polymorphism. An object oriented programming language code contains a class definition and its related objects. Hence, they are packaged into some sort of theme and this process is termed as Encapsulation. On the other hand, Inheritance is reusing of the features of one class in another class without defining them. So if you are building applications with large amount of code, you can apply this functionality so that you need not rewrite the whole code from scratch.

Polymorphism means defining different versions of the same code in various versions. The code snippet will be enclosed inside a method. For instance, Addition involves adding of 2 numbers, 3 numbers and so on. Here you are declaring one common situation in different ways. Since C# is an Object Oriented Programming language, it supports all the above features and hence you can apply them while developing C# applications.


Like it? Share with your friends!

0

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
0
love
lol lol
0
lol
omg omg
0
omg
win win
0
win
Anand Narayanaswamy
Anand Narayanaswamy is the editor-in-chief of Learnxpress. He was a Microsoft Most Valuable Professional (MVP) for a period of 9 years. He is a ASPInsider based in Trivandrum, Kerala State, India. Anand is the author of Community Server Quickly published by Packt Publishing.

0 Comments

Your email address will not be published. Required fields are marked *