Saturday 24 September 2016

C sharp introduction-2 oops concepts




Applications written in c# requires the .NET framework to be installed to run the application.
C# does not  offer global variables or function. Every think is wrapped in the classes.


Encapsulation:

Binding code and data together into a single unit is known as encapsulation. Take a  television  to watch the programs on tv users should only do the action like on, off or mute etc .But internal details of electricity circuit are hidden from the user. It is called encapsulation. That means end users should only call the methods to work with data. Data should not be directly handles from the end user.

Abstraction:

Hiding internal details and focusing only essential functionality is known as abstraction .For example  to create  student class there may be many properties but we focus only on student no, sname, mark etc.

Inheritance:

When one object acquires all the properties and behaviors of parent objects is known as inheritance.
Inheritance is the mechanism by which one object requires some/all properties of another object.

Polymorphism: 

1.       Polymorphism means to process objects differently based on their type.
2.       Multiple methods can have same name but which implementation to be used is decided at runtime depending upon  the situation.

o.k oops concepts over. But note one thing c# is called as component oriented application .

what is component oriented language?
A software is divided in to no of component is developed and then joined. For example we know that there is a spell checker in Ms-word. It is a separate component developed separately and made  to work with ms-word .In available languages  c# is the best component oriented language.
                                                          -will continue(Muthu karthikeyan)

No comments:

Post a Comment