Anim.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:0k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit Anim;
- interface
- type
- TAnimal = class
- public
- constructor Create;
- function GetKind: string;
- private
- Kind: string;
- end;
- TDog = class (TAnimal)
- public
- constructor Create;
- end;
- implementation
- constructor TAnimal.Create;
- begin
- Kind := 'An animal';
- end;
- function TAnimal.GetKind: string;
- begin
- GetKind := Kind;
- end;
- constructor TDog.Create;
- begin
- Kind := 'A dog';
- end;
- end.