What is Object Oriented Programming (OOP) and its various features with respect to C#

On February 8, 2010, in Education, Google, Tips and Tricks and Wordpress Blog, by Miss Neha Ashani

Object-oriented Programming (OOP) was introduced to strike flaws in a procedural proceed to programming, such as miss of re-usability as well as maintainability. OOP has a series of facilities which creates it opposite from customary procedural languages. Some of these facilities have been as follows:-
1.    It emphasizes upon a interpretation rsther than than a procedures.

2.    It can censor sure vicious interpretation to forestall entrance by any unapproved section.

3.    It allows brand brand new interpretation as well as functions to be simply combined at your convenience required.

Object-oriented programming has assorted advantages over procedural programming. Some of these are:

1.    It enables formula re-usability.

2.    It provides a transparent modular have up for programs, which creates it great for stealing data.

3.    It enables a user to say as well as cgange existent formula simply as new

Objects can be combined by creation teenager changes to existent ones. Object-oriented programming provides 4 facilities which have it graphic as well as absolute as compared to procedural programming. These facilities are:-

  • Abstraction

Consider an e.g. of a automobile which consists of a series of particular parts. Explaining a sum of any as well as each particular partial to a user can be formidable as well as complex. Further, a user competence not be means to assimilate such technical details. However, by deliberation a purpose of a user in regulating a car, usually a required facilities of a automobile can be explained. This is called abstracting report about an entity. Similarly in C#, a underline of describing usually a applicable report about an intent is called abstraction.

  • Encapsulation

Consider an e.g. of an ATM machine, a user inserts a ATM label as well as enters his/her pin number. If a pin series is wrong, an blunder summary is displayed. Otherwise, a pin series is supposed as well as a routine continues. However, a login routine consists of 3 steps. They include:-

1.    Reading a ATM label number.

2.    Validating a label as well as pin numbers.

3.    Receiving a outcome of possibly a login is current or not.

The validation routine is not manifest to a user, as it is dim so which it cannot be accessed or mutated for confidence reasons. Similarly in C#, sure vicious sum of a category can be dim from a alternative classes. This underline of interpretation stealing is termed as encapsulation.

  • Inheritance

Consider an e.g. of a family of 3 members carrying a mother, father as well as their daughter spoken Jill. Jill’s father is high as well as dim as well as his mom is reduced as well as fair. Jill is satisfactory as well as tall, so he is pronounced to have hereditary a facilities of a father as well as mom both. Similarly, in programming languages similar to C#, estate is a routine by which an intent of a single category acquires a characteristics as well as behaviors of a intent of an additional class.

A category can get an existent built-in category or a user-defined category usually if there exists a propinquity in between a dual classes. These family are:

1.    Is a: Student is a tellurian being. Here, a Human category can be a bottom category for a Student class.

2.    Type of: Mammal is a sort of an animal. Here, a Animal category can be a bottom category for a Mammal class.

3.    Part of: Gears have been partial of a car. Here, a Car category can be a bottom category for a Gears class.

  • Polymorphism

Consider an e.g. of x-ray oven. The oven can be used to comfortable food or bake equipment such as baked sweat bread as well as biscuits. Thus, it is seen which a same device can be used for behaving opposite tasks.

Similarly in C#, there can be mixed methods spoken with a same name possibly with opposite parameters or body. Methods with same name as well as opposite parameters have been well well known as overloaded methods since methods with same name though opposite physique have been well well known as overridden methods.

Thus OOP has assorted advantages over procedural programming. Some of these are:

1.    It enables formula re-usability.

2.    It provides a transparent modular have up for programs, which creates it great for stealing data.

3.    It enables a user to say as well as cgange existent formula simply as brand brand new objects can be combined by creation teenager changes to existent ones.
I Hope which this essay has since we an transparent thought about OOP. For any queries greatfully feel to write to me as well as do post your profitable comments it will assistance me to assimilate your needs better. Till afterwards keep blogging.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>