unit udmCrackerClass;

interface

uses SysUtils, uWantedClass;

type
  TCrackerClass = Class(TWantedClass);

  TClass1 = Class(Tobject)
  private
    FWanted : TWantedClass;
  public
    function GetWanted1 : Integer;
    function GetWanted2 : String;
    Constructor Create;
    Destructor Destroy; override;
  end;

Implementation

constructor TClass1.Create;
begin
  FWanted := TWantedClass.Create;
end;

destructor TClass1.Destroy;
begin
  FreeAndNil(FWanted);
  inherited;
end;

function TClass1.GetWanted1 : Integer;
Begin
//  Result := FWanted.prWanted1;
  Result := TCrackerClass(FWanted).GetWanted1;
End;

Function TClass1.GetWanted2 : String;
Begin
//  Result := FWanted.proWanted2;
  Result := TCrackerClass(FWanted).GetWanted2;
End;

end.
 