Answer the question
In order to leave comments, you need to log in
How to collapse the inheritance hierarchy into a linear chain?
In Robert Martin's book, How to Become a Software Development Professional, there is a phrase "They turn the switch into a polymorphic construct or collapse the inheritance hierarchy into a linear chain."
Please clarify the second.
Answer the question
In order to leave comments, you need to log in
They'll transform a switch statement into polymorphic deployment, or collapse an
inheritance hierarchy into a chain-of-command . In short, they treat software
the way a sculptor treats clay—they continuously shape and mold it.
inheritance hierarchy into a linear order of subordination
(see comment for an example)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question