A serious rejection of the answer here: stop; and step back. Forget about it.
The chances are extremely high that your design is already in very poor condition. Because you should always prefer a complex network of simple classes over a simple network of complex classes.
Inheritance is much more than just writing A extends B It starts with: in this case, any A is-a B. Alone, the number of methods that you specify in your question indicates that your classes do not follow this simple rule; and perhaps they also violate others.
So: donβt waste time to figure out how to add 10 more to the other 30 methods in your class. Take the time to throw everything away; and build an OO model of the real .
You will begin by understanding the problem area; derive useful, useful classes from this. Classes that focus on problem solving. Classes that follow SOLID rules. Or remember the old FCoI concept .
In short: I would consider a class with more than 10 methods to be refactored; but 30 abstract methods; it sounds (sorry) (almost) completely insane.
Change some comments: of course, it is possible that the OP is really a reasonable design; since there are examples of classes that come with many methods (for example, for a typical Swing UI component). But (imho) the likelihood of a βbadβ design is quite simple when dealing with a large number of abstract methods.
source share