B
billson
Unregistered / Unconfirmed
GUEST, unregistred user!
如下段代码:
type
THuman=class//人类
private
Age:Integer;//年龄
public
Name:string;//姓名
function GetAge:Integer;//获取年龄
procedure SetAge(A:Integer);//设置年龄
end;
TStudent=class(THuman)//学生类
public
SchoolName:string;//学校名称
procedure ShowInf;//显示学生信息
end;
TWorker=class(THuman)//工人类
public
Wage
ouble;//薪水
constructor Create(W
ouble);
destructor Destroy;override;
end;
为何学生类中没有使用constructor Create和destructor Destory等语句?
type
THuman=class//人类
private
Age:Integer;//年龄
public
Name:string;//姓名
function GetAge:Integer;//获取年龄
procedure SetAge(A:Integer);//设置年龄
end;
TStudent=class(THuman)//学生类
public
SchoolName:string;//学校名称
procedure ShowInf;//显示学生信息
end;
TWorker=class(THuman)//工人类
public
Wage
![Big Grin :D :D](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png)
constructor Create(W
![Big Grin :D :D](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png)
destructor Destroy;override;
end;
为何学生类中没有使用constructor Create和destructor Destory等语句?