News for hackers. Stuff that matters.
Re:Scientists discover spider species that feeds its young milk by soyyo on Saturday December 01, 2018 @01:42PM (#18578136)
Well, in this case, you just need to make a GiveMilkBehaviour interface and make a class for all the possible ways of giving milk. Now all animal classes that give milk implement that interface, use composition to include the proper way of giving milk, and the interface is implemented by delegation to that component.

No need for that pesky Mammal superclass

There are no comments on this comment yet.