--

`fun howItMove(animal: Animal)`

This is the function that points to the base class `Animal`.

The idea of LSP is avoid the need to change that function, while we increase more type of Animals. However, it might reach a point this is inevitable as the Animal definition has changed.

--

--

Elye - A One Eye Dev By His Grace
Elye - A One Eye Dev By His Grace

Written by Elye - A One Eye Dev By His Grace

Sharing Software Learning, Life and Faith Journey

Responses (1)