Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
48
tasks_gen/eval/G0167/seed/move_pricer.clas.abap
Normal file
48
tasks_gen/eval/G0167/seed/move_pricer.clas.abap
Normal file
@@ -0,0 +1,48 @@
|
||||
CLASS {{p}}move_pricer DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
TYPES ty_price TYPE p LENGTH 8 DECIMALS 2.
|
||||
|
||||
CONSTANTS:
|
||||
c_base_fee TYPE ty_price VALUE '250.00',
|
||||
c_volume_fee TYPE ty_price VALUE '40.00',
|
||||
c_distance_fee TYPE ty_price VALUE '1.20',
|
||||
c_floor_fee TYPE ty_price VALUE '15.00',
|
||||
c_packing_fee TYPE ty_price VALUE '180.00',
|
||||
c_weekend_rate TYPE ty_price VALUE '0.12'.
|
||||
|
||||
METHODS calculate
|
||||
IMPORTING iv_distance_km TYPE i
|
||||
iv_volume_m3 TYPE i
|
||||
iv_floor TYPE i
|
||||
iv_packing TYPE abap_bool
|
||||
iv_weekend TYPE abap_bool
|
||||
RETURNING VALUE(rv_price) TYPE ty_price.
|
||||
|
||||
PRIVATE SECTION.
|
||||
METHODS distance_fee
|
||||
IMPORTING iv_distance_km TYPE i
|
||||
RETURNING VALUE(rv_fee) TYPE ty_price.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}move_pricer IMPLEMENTATION.
|
||||
METHOD calculate.
|
||||
DATA lv_price TYPE ty_price.
|
||||
lv_price = c_base_fee + iv_volume_m3 * c_volume_fee.
|
||||
lv_price = lv_price + distance_fee( iv_distance_km ).
|
||||
IF iv_floor > 0.
|
||||
lv_price = lv_price + ( iv_floor - 1 ) * c_floor_fee.
|
||||
ENDIF.
|
||||
IF iv_packing = abap_true.
|
||||
lv_price = lv_price + c_packing_fee.
|
||||
ENDIF.
|
||||
IF iv_weekend = abap_true.
|
||||
lv_price = lv_price + round( val = c_base_fee * c_weekend_rate dec = 2 ).
|
||||
ENDIF.
|
||||
rv_price = lv_price.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD distance_fee.
|
||||
rv_fee = ( iv_distance_km DIV 10 ) * 10 * c_distance_fee.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user