*&---------------------------------------------------------------------*
*& Include Z17_011_CLASS *
*&---------------------------------------------------------------------*
* Definition part
******************************************
CLASS lcl_airplane DEFINITION.
*------------------------------
* Public section
*------------------------------
PUBLIC SECTION.
TYPES: t_name(25) TYPE c.
METHODS:
constructor,
set_attributes IMPORTING p_name TYPE t_name
p_planetype TYPE saplane-planetype,
display_attributes,
display_n_o_airplanes.
*------------------------------
* Private section
*------------------------------
PRIVATE SECTION.
* Private attributes
DATA: name(25) TYPE c,
planetype TYPE saplane-planetype.
* Private static attribute
CLASS-DATA n_o_airplanes TYPE i.
ENDCLASS.
******************************************
* Implementation part
******************************************
CLASS lcl_airplane IMPLEMENTATION.
METHOD constructor.
* Counts number of instances
n_o_airplanes = n_o_airplanes + 1.
ENDMETHOD.
METHOD set_attributes.
name = p_name.
planetype = p_planetype.
ENDMETHOD.
METHOD display_attributes.
WRITE:/ 'Name:', name, 'Planetype:', planetype.
ENDMETHOD.
METHOD display_n_o_airplanes.
WRITE: / 'No. planes:', n_o_airplanes.
ENDMETHOD.
ENDCLASS.
*& Include Z17_011_CLASS *
*&---------------------------------------------------------------------*
* Definition part
******************************************
CLASS lcl_airplane DEFINITION.
*------------------------------
* Public section
*------------------------------
PUBLIC SECTION.
TYPES: t_name(25) TYPE c.
METHODS:
constructor,
set_attributes IMPORTING p_name TYPE t_name
p_planetype TYPE saplane-planetype,
display_attributes,
display_n_o_airplanes.
*------------------------------
* Private section
*------------------------------
PRIVATE SECTION.
* Private attributes
DATA: name(25) TYPE c,
planetype TYPE saplane-planetype.
* Private static attribute
CLASS-DATA n_o_airplanes TYPE i.
ENDCLASS.
******************************************
* Implementation part
******************************************
CLASS lcl_airplane IMPLEMENTATION.
METHOD constructor.
* Counts number of instances
n_o_airplanes = n_o_airplanes + 1.
ENDMETHOD.
METHOD set_attributes.
name = p_name.
planetype = p_planetype.
ENDMETHOD.
METHOD display_attributes.
WRITE:/ 'Name:', name, 'Planetype:', planetype.
ENDMETHOD.
METHOD display_n_o_airplanes.
WRITE: / 'No. planes:', n_o_airplanes.
ENDMETHOD.
ENDCLASS.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
570 | REPORT Z17_011 | sapjoy | 2007.02.12 | 2287 |
» | INCLUDE Z17_011_CLASS | sapjoy | 2007.02.12 | 2489 |
568 | REPORT Z17_012 | sapjoy | 2007.02.12 | 2304 |
567 | REPORT Z17_014. [1] | sapjoy | 2007.02.13 | 2503 |
566 | REPORT Z17_015 | sapjoy | 2007.02.13 | 2280 |
565 | REPORT Z17_016 . | sapjoy | 2007.02.13 | 2162 |
564 | REPORT Z17_017 . | sapjoy | 2007.02.14 | 2181 |
563 | REPORT Z17_019 [1] | sapjoy | 2007.02.14 | 2748 |
562 | REPORT Z17_021 . | sapjoy | 2007.02.21 | 2386 |
561 | REPORT Z17_022 | sapjoy | 2007.02.21 | 2315 |
560 | REPORT Z17_000. | sapjoy | 2007.02.22 | 2419 |
559 | REPORT Z17_020 | sapjoy | 2007.02.22 | 2172 |
558 | REPORT z17_025 | sapjoy | 2007.02.22 | 2202 |
557 | REPORT Z17_020. [2] | sapjoy | 2007.02.23 | 2185 |
556 | REPORT Z09_013 | sapjoy | 2007.02.23 | 2243 |
555 | REPORT Z17_028 | sapjoy | 2007.02.26 | 2937 |
554 | Z17_ZSFLIGHT | sapjoy | 2007.02.26 | 2413 |
553 | REPORT Z02_016 | sapjoy | 2007.02.27 | 2294 |
552 | REPORT Z18_001 | sapjoy | 2007.03.02 | 2774 |
551 | Z18_001_PBO | sapjoy | 2007.03.02 | 2585 |