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

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



CLASS ZCL_OO_TUTORIAL_3_TESTER IMPLEMENTATION.


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

    aa_0017->FLIGHT-PRICE = `0.01`.
    AA_0017->CALCULATE_FLIGHT_PRICE(
      IMPORTING
        PRICE         = DATA(PRICE)
        CURRENCY_CODE = DATA(CURRENCY_CODE) ).

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

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

    UA_0017->CALCULATE_FLIGHT_PRICE(
      IMPORTING
        PRICE         = DATA(PRICE_BAD)
        CURRENCY_CODE = DATA(CURRENCY_CODE_BAD) ).

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

  ENDMETHOD.
ENDCLASS.
