Re: LSP Was: Mixing OO and DB
From: Stefan Ram <ram_at_zedat.fu-berlin.de>
Date: 23 Feb 2008 19:45:02 GMT
Message-ID: <subtype-20080223204217_at_ram.dialup.fu-berlin.de>
Date: 23 Feb 2008 19:45:02 GMT
Message-ID: <subtype-20080223204217_at_ram.dialup.fu-berlin.de>
ram_at_zedat.fu-berlin.de (Stefan Ram) writes:
>I would prefer the following criterion (in my own wording):
>»B is a subtype of P, when it fulfill P's specification.«
Application to operational types (objects):
In Java, the class of an object of the class String is a subtype of the class of an object of the class Object, because it fulfills the constraints for objects of the class Object (like the rules for the operation »hashCode«). It is a /proper/ subtype because it also fulfills additional constraints (like the rules for the operation »length«).Received on Sat Feb 23 2008 - 20:45:02 CET