In which Scenario you will go for Interface or Abstract Class?
By in OOP/OOD on Aug 03 2006
  • Subodh Jha
    Jul, 2013 23

    Its dependent, the time of designing the application. suppose your's requirement is clear the time of design and using the waterfall design model, You can use the Interface instead of abastract class. if your requirement is subsequently changes and using agile design pattern then you can use abstract class instead of Interface.

    • 0
  • Aug, 2006 4

    when u want to go for inheritance in so many derived classes but the methods implementations are different for different derived classes then u will make the class as abstract or interface. When all the method's implementations are based on derived class u will go for interface and if few implementations are common and remaining depends on derived class u will go for abstract class where u can have defined as well as declared methods also. Note: abstract and interface classes are used when their methods are mandatory for derived classes and are not optional. They put restriction on derived classes that they cannot skip those methods withoud having them in it. bye -Ram Nath Nishad New Horizons India Ltd, N-101,Manipal Center, Bangalore, India

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS