How to inherits a class in Progress 4gl ABL.­čśÇ

The class used
dev.OOP.Pessoa

Inheritance
USING dev.OOP.Pessoa.

CLASS dev.oop.corretor INHERITS Pessoa:
DEFINE PRIVATE VARIABLE endereco AS CHARACTER INITIAL “”.
CONSTRUCTOR PUBLIC corretor ():
SUPER ().
END CONSTRUCTOR.

DESTRUCTOR PUBLIC corretor ():
END DESTRUCTOR.

METHOD PUBLIC VOID setEndereco (INPUT p_endereco AS CHARACTER):
ASSIGN endereco = p_endereco.
END METHOD.

METHOD PUBLIC CHARACTER getEndereco ():
RETURN endereco.
END METHOD.

END CLASS.

Calling Corretor
DEFINE VARIABLE cCorretor AS CLASS dev.oop.corretor NO-UNDO.

cCorretor = NEW dev.oop.corretor().

/* Pessoa’s methods */
cCorretor:setNome(“eduardo”).
cCorretor:setSalario(700).

/* Corretors method */
cCorretor:setEndereco(“berrini”).

MESSAGE cCorretor:getNome() VIEW-AS alert-box.
MESSAGE cCorretor:getSalario() VIEW-AS alert-box.
MESSAGE cCorretor:getEndereco() VIEW-AS alert-box.

DELETE OBJECT cCorretor.

see u…