Questions of Designs

From: alexwu (alex139_at_nospam.com)
Date: 09/07/04


Date: Tue, 07 Sep 2004 00:56:46 GMT

1. Compared to composition, "Class inheritance also makes it easier to
modify the implementation be reused." What does this suppose to mean?

2. If programming to interface, not implementation, when shall it be that
every class derived from an Abstract Base Class? Or when should an Abstract
Base Class be declared?

Thanks for your help!



Relevant Pages

  • Re: passing a Factory to a method to create a generic instance
    ... FUNCTION FROM void TO Widget or whatever it'd be called, and then pass in a Widget class's constructor. ... Even if not, if the main thing that a Bolt is is a kind of Widget, i'd say use an abstract base class, not an interface, since it communicates a stronger sense of is-a. ...
    (comp.lang.java.programmer)
  • Re: Abstract class or interface?
    ... > what are some conceptual reasons to use one over the other? ... You don't know much about the objects that implement your interface, ... An abstract base class ... reason to use an abstract base class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: When not to use interfaces?
    ... BTW the Java "interface" concept isn't an OO interface, ... a Java interface is an abstract base class ... are talking about programming to the set of methods in an object. ... important to keep the principle in mind is in staticly-typed languages ...
    (comp.object)
  • Re: Design problem
    ... > I'm having trouble with what seems like it should be a relatively ... base class or interface and specific instances of shapes. ... That's 'structured programming' polluting your thinking. ... themselves (Template Method pattern). ...
    (comp.object)
  • Re: Unification of Methods and Functions
    ... I am suggesting that we write factory methods using classmethod to give ... my classes all implement an interface which I'll call 'shape ... Rectangle and Ellipse have a common base class, ...
    (comp.lang.python)