On Saturday, 8 May 2021 at 18:33:35 UTC, Jack wrote:
...
but the class ExtendFoo and ExtendedBaa must inherit from Foo
and Baa, respectively. But how can I make it inherit the
routines from DRY class too without multiples inheritance? in
C++ I'd just do:
class ExtendedFoo : DRY, Base { /* ... */ }
class ExtendBaa : DRY, Base { /* ... */ }
What about this model:
class baseFoo{
// Implement foo stuff
}
class baseFooBar : baseFoo{
// Implement bar stuff
}
class FooBar : baseFooBar{
// Do your FooBar thing!
}
Matheus.