Anda di halaman 1dari 2

report

z745oops14. Local Inheritance

*class institute definition final.


class institute definition.
public section.
methods display.
protected section.
data : course type string,
faculty type string,
duration type i.
endclass.
class institute implementation.
method display.
write :/ course,faculty,duration.
endmethod.
endclass.
class gensoft definition inheriting from institute.
public section.
methods setgensoft.
protected section.
data estdyear type i.
endclass.
class gensoft implementation.
method setgensoft.
estdyear = 2013.
course = 'ABAP'.
faculty = 'ABC'.
duration = 5.
write :/ estdyear.
endmethod.
endclass.
start-of-selection.
data gs type ref to gensoft.
create object gs.
call method : gs->display.

uline.
call method : gs->setgensoft,
gs->display.

Anda mungkin juga menyukai