unit uw25132; {$ifdef fpc} {$mode delphi} {$endif} interface type TIterator = class(TObject) public function GetValue(): Integer; virtual; abstract; end; TCollectionIterator = class(TIterator) public function GetValue(): Integer; override; end; implementation { TCollectionIterator } function TCollectionIterator.GetValue(): Integer; begin Result := 1; end; end.