Saturday, May 17, 2014

What Class Am I?

This post and the following pithy remark by a commenter reminded me of my own question regarding a not-identical but related quandary I posed here.

...by Walky_one:
The basics of object oriented design with polymorphism is:
The base class defines functionality that is COMMON for all derived classes.
Functionality that is NOT COMMON should NOT be in the base class.
I know the UnsupportedOperationException approach (and sometimes I even agree that it's a workable way): However it's still an approach that violates one of the most central aspects of object oriented design...