      $set repository(update on)
123456 class-id. Motor inherits base.

       repository.
           class motor
           class base as "base"
           .

       factory.

       working-storage section.
   
       method-id. "newMotor".
       linkage section.
       01 new-obj usage object reference active-class.
       procedure division returning new-obj.
           invoke super "new" returning new-obj
           exit method
       end method "newMotor".

       end factory.

       object.
       working-storage section.
       1 engine-size   binary-char unsigned property no set.
       1 engine-number binary-char unsigned property no set.

       method-id. "initMotor".
       linkage section.
       1 lk-size  binary-char unsigned.
       1 lk-no    binary-char unsigned.
       procedure division using lk-no lk-size.
           move lk-size to engine-size
           move lk-no   to engine-number
           exit method
       end method "initMotor".

       method-id. "displaymotor".
       procedure division.
           display "Number of engines: " engine-number
           display "SIze   of engines: " engine-size
           exit method
       end method "displaymotor".
       end object.
 
       end class Motor.
