I’ve two classes that need to use the same method and I believe inheritance is overkill since this is the only thing in common: there are no relations and the operation is very specific.
The method to be reused just take two parameters and calculate an operation with them.
I’ve two classes that need to use the same method and I believe inheritance
Share
It sounds like a utility method. So, I think a separate class containing that method as a static method would do the trick