0 penilaian0% menganggap dokumen ini bermanfaat (0 suara)
29 tayangan2 halaman
The document defines two classes - institute and gensoft, with gensoft inheriting from institute. The institute class contains attributes for course, faculty, and duration. The gensoft class contains an additional attribute of estdyear. An object is created from the gensoft class and its setgensoft method sets the attribute values, then its display method outputs the attributes.
The document defines two classes - institute and gensoft, with gensoft inheriting from institute. The institute class contains attributes for course, faculty, and duration. The gensoft class contains an additional attribute of estdyear. An object is created from the gensoft class and its setgensoft method sets the attribute values, then its display method outputs the attributes.
The document defines two classes - institute and gensoft, with gensoft inheriting from institute. The institute class contains attributes for course, faculty, and duration. The gensoft class contains an additional attribute of estdyear. An object is created from the gensoft class and its setgensoft method sets the attribute values, then its display method outputs the attributes.
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.