My apologies if a variation of this question has been asked before, but due to its nature it is hard to search for.
I am having a discussion with a colleague about object-oriented design, and it basically comes down to a choice between two different paradigms. What I had been searching Google for was a discussion between these - as I've seen both discussed.
Have a small number of classes which answer a lot of public methods, many of which are not applicable unless in certain circumstances. In these cases, they throw a runtime exception.
Example: a mathematical vector class can have any number of elements. This class answers 'Cross', but returns an error if it has anything other than 3 elements.
A deeper inheritance tree, with methods only appearing where they are applicable.
Example: the mathematical vector class is specialised as a 3D-vector, with only the 3D-vector answering 'Cross'. 3D vectors are a special case as there are many functions relevant to a positional vector alone (Dot, Cross, Distance, AngleTo, etc).
I'm not actually asking for opinions on the above (although clearly the second is better!) but where can I find a good discussion on this - and similar - design issues. I can find many beginners' discussions/tutorials on the subject, but I haven't had any luck finding the more in-depth articles.
After a prompt from @JohnDibling, I'll rephrase the question (and add another Paradigm on request):
Lightweight objects with a suite of functions to interpret them, and throw errors if the provided arguments weren't valid.
Example: all vectors only respond to the most basic requests, and a series of functions like Size(vector), Cross(vector) do all of the work. Cross would throw a (runtime) error if an argument of the wrong size is given.
Could anyone give me specific reasons why A or C might be preferable to B, or point me to an article which discusses this issue in depth?