"! <p class="shorttext synchronized" lang="en">OO Tutorial #4 Tester</p>
CLASS ZCL_OO_TUTORIAL_4_TESTER DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.
    INTERFACES IF_OO_ADT_CLASSRUN.
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.



CLASS ZCL_OO_TUTORIAL_4_TESTER IMPLEMENTATION.


  METHOD IF_OO_ADT_CLASSRUN~MAIN.
    DATA(AA_0017) = NEW ZCL_OO_TUTORIAL_4(
        CARRIER_ID    = `AA`
        CONNECTION_ID = `0017`
        FLIGHT_DATE   = `20200213` ).

    DATA(FLIGHT_GOOD) = AA_0017->CALCULATE_FLIGHT_PRICE( ).
    OUT->WRITE( |Flight Price for AA-0017 on {  CONV /DMO/FLIGHT_DATE( `20200213` ) DATE = ENVIRONMENT }: | &&
                |{ FLIGHT_GOOD-PRICE CURRENCY = FLIGHT_GOOD-CURRENCY } { FLIGHT_GOOD-CURRENCY }| ).
    OUT->WRITE( AA_0017->GET_FLIGHT_DETAILS( ) ).

    OUT->WRITE( ` `).
    DATA(UA_0017) = NEW ZCL_OO_TUTORIAL_4(
      CARRIER_ID    = `UA`
      CONNECTION_ID = `0017`
      FLIGHT_DATE   = `20190530` ).

    DATA(FLIGHT_BAD) = UA_0017->CALCULATE_FLIGHT_PRICE( ).

    OUT->WRITE( |Flight Price for UA-0017 on {  CONV /DMO/FLIGHT_DATE( `20190530` ) DATE = ENVIRONMENT }: | &&
                |{ FLIGHT_BAD-PRICE CURRENCY = FLIGHT_BAD-CURRENCY } { FLIGHT_BAD-CURRENCY }| ).
    OUT->WRITE( UA_0017->GET_FLIGHT_DETAILS( ) ).
  ENDMETHOD.
ENDCLASS.
