Re: OO is not that great: many repeated codes
- From: "Guruk" <rwilson@xxxxxxxxxxxxxxx>
- Date: 22 Sep 2006 07:47:51 -0700
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
.
- References:
- OO is not that great: many repeated codes
- From: Shawn
- OO is not that great: many repeated codes
- Prev by Date: OO is not that great: many repeated codes
- Next by Date: Re: OO is not that great: many repeated codes
- Previous by thread: OO is not that great: many repeated codes
- Next by thread: Re: OO is not that great: many repeated codes
- Index(es):