ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net AllOther
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
When should you use Abstract Class vs Interface while 
programming? Give 1 Example
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: When should you use Abstract Class vs Interface while programming? Give 1 Example
Answer
# 1
Abstract class can contain non abstract method. 
  When we want that all subclass must implement all methods of 
base class ;In such situation use interface.In other hand
when we want only some method of base class in our subclass
then use base class as abstract class because abstract class
can contain non-abstract method.

 
Is This Answer Correct ?    12 Yes 5 No
Rupali
 
  Re: When should you use Abstract Class vs Interface while programming? Give 1 Example
Answer
# 2
Interfaces are used when we want classes should follow the 
rules strictly. Rules like naming coventions e.g. if in 
customer class one developer add method AddCustomer other 
developer while implementing Invoice class could write 
method name InvoiceAdd and also could change the Signiture 
rules. for addition of customer we have at client code as 
Cutomer.AddCustomer(A,B,C); and Invoice.InvoiceAdd(A,B)
To maintain uniformality if we declare interface and define 
method Add(A,B) in that interface and implement that 
interface in both the classes then the code will be uniform 
all over the classes where ever we have implemented 
interface and also all concrete classes must contain 
methods which are defined in the interfaces.
 
Is This Answer Correct ?    5 Yes 2 No
Pravin Shrirao
 
 
 

 
 
 
Other Dot Net AllOther Interview Questions
 
  Question Asked @ Answers
 
3. Should validation (did the user enter a real date) occur server-side or client-side? Why?  3
what is ado.net HCL6
What is the difference between a web custom control,web user control and a web part. 247Customer1
while developing a asp.net 2.0 ajax application how to maitain and check the ACID property for each transaction Aviva2
what is the difference between value types and reference types? Six-Sigma2
how to display a message box in the Application? Six-Sigma2
what is web service?  1
Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?  1
The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.  2
how would you manage data if u were not to use sessions or cookies ? Ness-Technologies2
2. What type of code (server or client) is found in a Code-Behind class?  1
what is meant by language interoperability and language integration? Six-Sigma1
Will finally block exec if we write an return statement to a try block???????  2
What is ITIL? What is the use of ITIL and how it works? IBM1
What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?  1
What is this DLL hell problem in dotnet? Can a virtual class be created/can a virtual method be created inside the class? HCL2
what is a tool tip Six-Sigma2
Can you explain the difference between an ADO.NET Dataset and ADO Recordset?  1
what is Difference beetween Array and Hash Table.? Patni5
how to find the 2nd higgest salary in the column for example take table name is employee? And also find bottom 2nd lowest salary ? GeoTechnology6
 
For more Dot Net AllOther Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com