Your post is an excelent example of why inheirtance relationships are so hard to get right (even for this seemingly trivial example). From a Eucldian point of view, a square ISA rectangle. However, in OOP, a subclass is supposed to extend the parent's behavior, so it makes more sense to say a rectangle ISA square. Two groups thus create two opposite designs.
So who is right? It depends on your application. As you say, if this is a program for geometry, it's probably better to say a square ISA rectangle. If it's a CAD program, then it's probably better to say a rectangle ISA square.
----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.
In reply to Re^3: When are packages the right design choice?
by hardburn
in thread When are packages the right design choice?
by fuzzyping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |