메뉴 건너뛰기

SAP 한국 커뮤니티



현재 아밥oop 관련해서 공부하고있는데요. definition inheriting from object 구문에 대해서 질문드립니다.


inheriting from구문이 원래 기존에 선언된 클래스로부터 모든 컴포넌트들을 상속받게 되는데요.


inheriting from 뒤에 참조할 클래스명이 안오고..밑의 소스 코드 처럼 object로 선언하면 어떤의미가 되는지


궁금합니다.


 


 

class vehicle definition inheriting from object
  public section.
    methodscreate.
  protected section.
    data speed type i value '90'.
endclass.                    "vehicle DEFINITION

*----------------------------------------------------------------------*
*       CLASS vehicle IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class vehicle implementation.
  method create.
    write : / 'excel is from pony'.
endmethod.                    "create
endclass.

data: pony type ref to vehicle,
        excel type ref to vehicle.

start-of-selection.
 create object : pony. "객체참조 할당
 excel = pony.

 call method: excel->create.


* e-abap님에 의해서 게시물 이동되었습니다 (2008-06-11 19:51)