Please help me to design supertype-subtype ..



Hi all,

We are designing our business components, I am confused about the
criteria to determine whether my two classes should be put into
Supertype/Subtype relationship.

Just because two classes have common attributes, is it enough reason to
create supertype-subtype on them ? What are other reason ?

For example, I have two classes : Sales & SalesReturn. They have
attributes in common. Should I make them supertype-subtype ?

Thank you very much,
xtanto

.



Relevant Pages

  • Re: Please help me to design supertype-subtype ..
    ... Just because two classes have common attributes, is it enough reason to ... Should I make them supertype-subtype? ... In C++, this is a reasonable technique, because you have multiple inheritance, virtual inheritance, and the full public/private/protected access control mechanism. ... In Java, you are better off moving the functionality into a completely separate, third class, and letting Sales and SalesReturn each instantiate the third class. ...
    (comp.lang.java.programmer)
  • Re: Please help me to design supertype-subtype ..
    ... We are designing our business components, ... Just because two classes have common attributes, is it enough reason to ... Should I make them supertype-subtype? ...
    (comp.lang.java.databases)
  • Please help me to design supertype-subtype ..
    ... Supertype/Subtype relationship. ... Just because two classes have common attributes, is it enough reason to ... Should I make them supertype-subtype? ...
    (comp.lang.java.programmer)
  • Please help me to design supertype-subtype ..
    ... 1)Just because two entities have common attributes, is it enough reason ... Should I make them supertype-subtype? ... Does it make any sense to store Sales & SalesReturn in one table? ...
    (comp.databases.oracle.server)
  • Re: Please help me to design supertype-subtype ..
    ... Just because two classes have common attributes, ... I have two classes: Sales & SalesReturn. ... Should I make them supertype-subtype? ...
    (comp.lang.java.programmer)