[Chicago-talk] Object question - subclass or make two similar classes

Jay Strauss me at heyjay.com
Sun Feb 1 11:07:05 CST 2004


Hi,

I have 2 classes that have identical methods.  Should I write 2 classes, or
a parent and 2 subclasses?  The class is "brokerage" as in Ameritrade and
InteractiveBrokers.  They both have methods like: connect, placeOrder,
getQuote, getTransactionHistory... but the code to perform these actions is
totally different between classes.

I'm just wondering, what do I gain by making a single parent, and
subclassing?

Thanks
Jay




More information about the Chicago-talk mailing list