When should you use Abstract Class vs Interface while
programming? Give 1 Example
Answer Posted / pravin shrirao
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 ? | 22 Yes | 5 No |
Post New Answer View All Answers
What is IL code, CLR, CTS, GAC & GC?
hi, kindly send WWF(.net 3.5) pdf notes to my id. thanx in advance, chays
What does the term "green architecture" mean? : .NET Architecture
What is the access level of the visibility type internal?
What is the procedure on hardware that converts the ascii value to binary? : .NET Architecture
What are end points, contract, address and bindings?
What is cache coherency? : Dot net architecture
What's the difference between an application and a program?
What are the options provived by vss to the user? how it will help us while delevoping application?
I am working with asp.net 2005 and Crystal report 10. I have an image field on my dataset to show on Crystal report.And the image is shows dynamically from database in image field of CR. The image field is showing well on my Crystal report on its first page with all other data but when i click to open second page of CR,it does not show any data on that.I found that this is because of adding the image field on crystal report. Because when i remove the image field from the CR then it will run both the pages of CR. I am using the Page Load event to bind CR data with Database. And i have already check with the Init event to bind CR , but it still not shows the data on second page when i use image field on that. Please give solution for that.....
How can implement drag and drop using atlas?
What is .net mobile input validation. : Microsoft dot net mobile
What is the difference between an event and a delegate?
Explain the difference between inprocess vs out process session state : Dot net architecture
what is the difference between running an application with and without debugger?