B
Brett Romero
Say I have several classes that have implemented the same code to do
something. Perhaps its connection information. They all have inherited
some class and not necessarily the same one. I'd like to take the
duplicated code and reuse it. I can't put it into ClassA, for example,
and allow these classes to inherit ClassA since they have used the one
inheritance slot. I could make ClassA a singleton, since ClassA needs
state.
Besides the singleton, how else can I reuse this code? Basically, I
need a file include (used so much in Cold Fusion and SHTML files).
Thanks,
Brett
something. Perhaps its connection information. They all have inherited
some class and not necessarily the same one. I'd like to take the
duplicated code and reuse it. I can't put it into ClassA, for example,
and allow these classes to inherit ClassA since they have used the one
inheritance slot. I could make ClassA a singleton, since ClassA needs
state.
Besides the singleton, how else can I reuse this code? Basically, I
need a file include (used so much in Cold Fusion and SHTML files).
Thanks,
Brett