Given that this is an #explainlikeimfive post, abstracting away from the code is rather a fundamental requirement :).
But for completeness sake: the original books would have been the UnicornBook, DragonBook and LabradorBook classes, which are nearly identical expect wherever the Unicorn, Dragon or Labrador classes (or their instances) are used. The generic equivalent would ba a Book where T can be added for whatever you like, to create e.g. Book< Unicorn > or Book< Eagle >.
Given that this is an #explainlikeimfive post, abstracting away from the code is rather a fundamental requirement :).
But for completeness sake: the original books would have been the UnicornBook, DragonBook and LabradorBook classes, which are nearly identical expect wherever the Unicorn, Dragon or Labrador classes (or their instances) are used. The generic equivalent would ba a Book where T can be added for whatever you like, to create e.g. Book< Unicorn > or Book< Eagle >.
Hope that helps :-).
Heh, totally get where your coming from.