V
V
Victor Bomberow2019-09-02 12:51:28
OOP
Victor Bomberow, 2019-09-02 12:51:28

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

1 answer(s)
R
Roman, 2019-09-02
@majstar_Zubr

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 question

Ask a Question

731 491 924 answers to any question