      $set repository(update on checking on)
      *-----------------------------------------------------------------
       class-id. Student as "Student" inherits Person.

       repository.
           class Student as "Student"
           class Person as "Person"
           class CharString as "String"
           .

       factory.

      *---------------------------------------------
      *
      * newStudent: Allocates a new object reference and invokes
      *   initStudent to initialize the new instance
      *
      *---------------------------------------------

       method-id. "newStudent".
       data division.
       linkage section.
       01  lk-personName pic x any length.
       01  lk-dob        pic x any length.
       01  new-object   usage object reference active-class.
       procedure division using lk-personName lk-dob
                          returning new-object.
           invoke super "newperson" using lk-personName
                                           lk-dob
                                     returning new-object
           exit method
           .
       end method "newStudent".

       end factory.

      *-----------------------------------------------------------------

       object.
       working-storage section.
       01  courseTitle usage object reference CharString property.

      *---------------------------------------------
      *
      * display: display student details
      *
      *---------------------------------------------

       method-id. "display" override.
       procedure division.
           invoke super "display"
           display "Course title: " with no advancing
           display " " with no advancing
           invoke courseTitle "displaynl"
           exit method.
       end method "display".

      *---------------------------------------------
      *
      * finalize: remove resourses used by this class
      *
      *---------------------------------------------

       method-id. "finalize" override.
       procedure division.
           invoke super "finalize"
           invoke courseTitle "finalize"
           exit method.
       end method "finalize".

       end object.
       end class Student.
       
