unit fStudentVO;interfaceuses SysUtils;type
TStudentVO = class;
private
studentID:string;
studentName:string;
birthday:string;
public
function getStudentID:string;
procedure setStudentID(aStudentID:string);
end;
implementation
function TStudentVO.getStudentID():string;
begin
Result := studentID;
end; function TStudentVO.setStudentID(aStudentID:string);
begin
if studentid<> astudentid then
studentID := aStudentID;
end;end.
TStudentVO = class;
private
studentID:string;
studentName:string;
birthday:string;
public
function getStudentID:string;
procedure setStudentID(aStudentID:string);
end;
implementation
function TStudentVO.getStudentID():string;
begin
Result := studentID;
end; function TStudentVO.setStudentID(aStudentID:string);
begin
if studentid<> astudentid then
studentID := aStudentID;
end;end.
Type
Student = Record
studentID: String;
studentName: String;
birthday: String;
End;//这个使用类没有必要,因为只是有数据成员或者等效于只有数据成员。