Hello
When creating inheritance hierarchy, i get confused .Abstract Base class should contain only commonly used stuffs for inherited classes.But knowing which is commonly used methods,fields and properties is not possible while designing.So i feel free myself to grouping them with abstract classes which inherits hierarchicaly. This is what i am doing without care about which my real classes where will be in hierarchy because i will find easily a place in comprehensive hierarchy.And also it is highly possible to find some unnecessary abstract classes in middle of hierarchy.But i don't know is this right way of designing.And which disadvantages can occur in none-perfect abstract hieararchy.I have to give clear example for it.Think chess and pieces.If i have to define pieces like pawn,queen,king...etc.look at below uml.
I divided hieararcy to 2 slided and none-slided pieces after Piece abstract class.Because i believe that sliding and none-sliding will require different commonly used members.But i can also divide them directional because some pieces can go 8 direction ,some of can 4 direction and some of can go to 2 or 3 three direction. Grouping them directional cause some new questions.Where they will be in hierarchy ? they will come after sliding classes ? If so possible to find four directional grouping under sliding and none-sliding groups and we know that it is not possible to inherited by 2 classes.So for such situations i have to choose interfaces ? if directions will never be under both so it is possible to use abstract classes.Thats ok then if i found again new common grouping which will not require inherited by 2 classes so i can define it under directions.In the end of design ,all of my pieces can find perfect leaf nodes in hierarchy and this will be really good for future to have enough comprehensive building which i will not need change something in hierarchy.
But what can be disadvantage to creating too large comprehensive hieararchy ? Can be that in auto-complete of IDE can show many unnecessary and strange named abstract base classes which confuse others ? what can be other disadvantages ?