*!*/////////////////////////////////////////////////////// *!* Class.........: Person DEFINE CLASS Person AS Session Name = "" Sex = "F" Birth = Date() *-------------------------- FUNCTION Age( BirthDate AS Date ) AS Number Local lnAge as Number *-----* Return lnAge EndFunc *-------------------------- EndDefine *!* *!*END DEFINE *!* Class.........: Person *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Professional DEFINE CLASS Professional AS Person Title = "" Available = .T. VocationClass = "" VocationLibrary = "" oVocation = null *-------------------------- PROCEDURE Init This.oVocation = NewObject( This.VocationClass, This.VocationLibrary ) ENDPROC *-------------------------- Function Hire() as Boolean Local lIsHire as Boolean *-----* Return lIsHire EndFunc *-------------------------- ENDDEFINE *!* *!*END DEFINE *!* Class.........: Professional *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Student DEFINE CLASS Student AS Person University = "" Career = "" VocationClass = "" VocationLibrary = "" oVocation = null *-------------------------- PROCEDURE Init This.oVocation = NewObject( This.VocationClass, This.VocationLibrary ) ENDPROC *-------------------------- ENDDEFINE *!* *!*END DEFINE *!* Class.........: Student *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Vocation DEFINE CLASS Vocation AS Session Name = "" ENDDEFINE *!* *!*END DEFINE *!* Class.........: Vocation *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Medicine DEFINE CLASS Medicine as Vocation *-------------------------- PROCEDURE Operate( oPerson AS Person ) AS Void *----* ENDPROC *-------------------------- ENDDEFINE *!* *!*END DEFINE *!* Class.........: Medicine *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Law DEFINE CLASS Law as Vocation ENDDEFINE *!* *!*END DEFINE *!* Class.........: Law *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: LawStudent DEFINE CLASS LawStudent AS Student VocationClass = "Law" VocationLibrary = "MyClassLibrary" ENDDEFINE *!* *!*END DEFINE *!* Class.........: LawStudent *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Lawyer DEFINE CLASS Lawyer AS Professional VocationClass = "Law" VocationLibrary = "MyClassLibrary" ENDDEFINE *!* *!*END DEFINE *!* Class.........: Lawyer *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: MedicineStudent DEFINE CLASS MedicineStudent AS Student VocationClass = "Medicine" VocationLibrary = "MyClassLibrary" ENDDEFINE *!* *!*END DEFINE *!* Class.........: MedicineStudent *!* *!*/////////////////////////////////////////////////////// *!*/////////////////////////////////////////////////////// *!* Class.........: Doctor DEFINE CLASS Lawyer AS Professional VocationClass = "Medicine" VocationLibrary = "MyClassLibrary" ENDDEFINE *!* *!*END DEFINE *!* Class.........: Doctor *!* *!*///////////////////////////////////////////////////////