in reply to Re^3: Understanding 'Multiple Inheritance'
in thread Understanding 'Multiple Inheritance'
As DragonChild suggests, you ought to take a more component oriented approach, assembling the final product from base components.
I would probably have something along the lines of the following classes: CDPlayerInterface, RadioInterface, AudioDeviceInterface, CDPlayer, Radio, and RadioCDCombo. The Radio class would be a marriage of the RadioInterface and AudioDeviceInterface, the CDPlayer class would be a marriage of the CDPlayerInterface and the AudioDeviceInterface, and the RadioCDCombo class would be a marriage of CDPlayerInterface and RadioInterface and AudioDeviceInterface.
Or something like that... I'm not sure I like the specifics of my solution, but I think the general paradigm is better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: You need to break up the design more cleanly.
by BrowserUk (Patriarch) on Mar 07, 2005 at 14:52 UTC | |
|
Re: You need to break up the design more cleanly.
by Anonymous Monk on Mar 08, 2005 at 09:21 UTC |