in reply to OOP - Sharing class methods
If the code can be used by both ClassOne and ClassTwo, why not make UtilityClassOne with this (and possibly other) methods that can be used by both? Inheritance is a possibility, but this doesn't sound like an 'is a' sort of relationship and IMO inheritance gets confusing if it's used in places where composition is more appropriate (e.g., 'has a').
Chris
M-x auto-bs-mode
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: OOP - Sharing class methods
by mp (Deacon) on Aug 14, 2002 at 19:09 UTC |