[fpc-devel] class abstract, class sealed implementation. please review.

"Vinzent Höfler" JeLlyFish.software at gmx.net
Mon Oct 19 12:46:39 CEST 2009


Paul Ishenin <ip at kmiac.ru>:

> TBasicPhone = class abstract
> TCellularPhone = class(TBasicPhone)
> TSatelitePhone = class(TBasicPhone)
> TDialPhone = class(TBasicPhone)
> ...
> TNokiaPhone = class(TCellularPhone)
> TNokia37xxPhone = class(TNokiaPhone)
> TNokia3720Phone = class sealed(TNokia37xxPhone)
> 
> TBasicPhone is ofcource an abstract class. It can have some basic fields 
> like color, weight, dimensions, ...
> TNokia3720Phone is a final product which can't have any further 
> derivations. It is logically to mark this class as sealed to prevent 
> ocasional errors.

And what is with the TNokia3720Phone_DeluxeEdition which is basically the same as TNokia3720Phone, but with some enhanced features?

> Why to limit other developers?

Precisely. ;)


Vinzent.

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser



More information about the fpc-devel mailing list