Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Interface and Abstract class, inheritance, abstraction with
examples. Polymorphism (difference betn overloading and
overriding

Answers were Sorted based on User's Feedback



Interface and Abstract class, inheritance, abstraction with examples. Polymorphism (difference bet..

Answer / alb.shah

Abstract class:
Abstract class act as base class, not instantiable, no
implementaiotn in base class but allow implementaiotn in
derived class with overide method, method must be abstract.
specially used in inheritance.

Interface:

Interface class dont have constructor, destructor,
always public modifier set to true
no implementation
cant used multiple inheritance instead of this we use
multiple interface

Inheritance :

In Inheritance we can use one class property into another
class..
using System;
class sample
{
public void display()
{
Console.WriteLine("C#");
}
}
class sample1:sample
//(Inheriting the property of class sample in class sample1)
{
public void disp()
{
Console.WriteLine("C++");
}
}
class Test
{
public static void Main()
{
sample1 sm=new sample1(); //creating a object of sample1
sm.display(); //accessing function of sample class
sm.disp();
}

Abstraction :

"Abstraction" simply means showing only those details to
the user which are of use to them , and hiding up the
unnecessary
Abstraction is the process or result of generalization by
reducing the information content of a concept or an
observable phenomenon

polimorphism :

polimorphism is the one of the oops features, allows one
object to appear in different form by changing the type.

Two types:
1- Static eg:method overloading
2- Dynamic eg:method overriding

difference betn overloading and overriding :

OverLoading means one name many forms .its functionallty
changes corresponding to the objects
Overriding means its funcationality can be overrided.these
can be done by using by using two keywords
1.overrideable
2.overrides
overriding take place with in the in_heritance. it is not
possiable with in the class.

Is This Answer Correct ?    6 Yes 0 No

Interface and Abstract class, inheritance, abstraction with examples. Polymorphism (difference bet..

Answer / amey

Interface and Abstract class both derived from Method.If u call Abstract class then u have to call all the method of Abstract class but I u call Interface then need not call all the method of Interface.

Inheritance means it is a mechanism of design or construction
from one class to another.

Polymorphism means It is the ability take more than one form.

overloading means same name, different parameter.

overriding means different name, parameter may be different.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What is the difference between client-side and server-side validations in ASP.NET?

0 Answers   Sans Pareil IT Services,


Explain how can we inherit a static variable?

0 Answers  


About Global .asax ?

6 Answers   Satyam,


What is preprocessor in .net and type, where it use?

0 Answers  


What is difference between asp.net and asp.net mvc? : Asp.Net MVC

0 Answers  


On Age field how many Asp.Net validation controls will be suit?

7 Answers   NTTF Nettur Technical Training Foundation, Quest,


Explain code snippet to register exception filters from controller?

0 Answers  


Explain what a diffgram is, and a good use for one?

1 Answers   FT,


a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net?

0 Answers   CTS,


is it possible to develop gaming application using .net technology?

2 Answers  


Explain the use of duration attribute of @outputcache page directive.

0 Answers  


Is asp.net and .net are same or different?

0 Answers  


Categories