Re: OO is not that great: many repeated codes



As you see, methods are repeated in many classes. It is hard to use
inheritance to solve the issue. Particularly, Professor and Calculator
cannot share a superclass in real world. And in Java, there is no
multiple inheritance.


It's not important that both Professor and Calculator can compute the
average of two numbers, but HOW those objects do the computation. A
Professor's Average function will most likely be very different then a
Calculator's Average function. Another thing to consider is that ALL
programming methodologies have certain drawbacks. IMHO, the drawbacks
that exist in OOP are extremely minimal compared to it's bonuses!

~ Guruk

.