What design pattern should I use for specific multiple inheritance?
DynamicSquid (5067)

Let's say I have an interface called Squid.

And we have a bunch of different types of squids:

Here's everything a squid can be:


How would I go about create an instance of a squid? Should I go about creating 4 classes BasicAquaticSquid, BasicLandSquid, AdvancedAquaticSquid, AdvancedLandSquid like this:

I think that's called the Abstract Factory method? It seems very tedious though. Any better way of doing so?


You are viewing a single comment. View All
Answered by xxpertHacker (931) [earned 5 cycles]
View Answer
DynamicSquid (5067)

@xxpertHacker It's not really a game, more like a "museum" lol. But yeah, I think you're right. I want polymorphism (what's short form for "polymorphism"? is it "polymorph", or can I say "poly") to work as well, so I probably have to make generic methods.

Thanks for the help though!