6 ms·
Yes. The textbook examples really don't do practical applications justice though, e.g.: shape ... circle extends shape I find it very useful to ex
by guinness74 6y ago
Yes. The textbook examples really don't do practical applications justice though, e.g.:
shape
...
circle extends shape
I find it very useful to extend classes in an existing framework or system with a new functionality specific for my particular problem.
For a general example, sub-typing exceptions is useful.
- byko3y 6y agoYeap, same here. The last time when I actually created from scratch classes with inheritance was like 8 years ago. I never made this mistake again and used inheritance only when forced to by creators of some library.