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:
68
tasks_gen/eval/G0139/seed/marina_fee.clas.abap
Normal file
68
tasks_gen/eval/G0139/seed/marina_fee.clas.abap
Normal file
@@ -0,0 +1,68 @@
|
||||
CLASS {{p}}marina_fee DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
TYPES ty_boat_type TYPE c LENGTH 1.
|
||||
TYPES ty_season TYPE c LENGTH 1.
|
||||
TYPES ty_fee TYPE p LENGTH 8 DECIMALS 2.
|
||||
METHODS calculate_fee
|
||||
IMPORTING
|
||||
iv_length_m TYPE i
|
||||
iv_nights TYPE i
|
||||
iv_boat_type TYPE ty_boat_type
|
||||
iv_season TYPE ty_season
|
||||
iv_power TYPE abap_bool
|
||||
RETURNING
|
||||
VALUE(rv_fee) TYPE ty_fee.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}marina_fee IMPLEMENTATION.
|
||||
METHOD calculate_fee.
|
||||
DATA lv_base TYPE ty_fee.
|
||||
DATA lv_factor TYPE ty_fee.
|
||||
DATA lv_nightly TYPE ty_fee.
|
||||
DATA lv_total TYPE ty_fee.
|
||||
|
||||
IF iv_length_m <= 0 OR iv_nights <= 0.
|
||||
rv_fee = 0.
|
||||
ELSE.
|
||||
IF iv_length_m <= 8.
|
||||
lv_base = '20.00'.
|
||||
ELSE.
|
||||
IF iv_length_m <= 12.
|
||||
lv_base = '32.00'.
|
||||
ELSE.
|
||||
IF iv_length_m <= 18.
|
||||
lv_base = '48.00'.
|
||||
ELSE.
|
||||
lv_base = '75.00'.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
IF iv_boat_type = 'C'.
|
||||
lv_factor = '1.50'.
|
||||
ELSE.
|
||||
IF iv_boat_type = 'M'.
|
||||
lv_factor = '1.20'.
|
||||
ELSE.
|
||||
lv_factor = '1.00'.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
lv_nightly = lv_base * lv_factor.
|
||||
IF iv_season = 'H'.
|
||||
lv_nightly = lv_nightly * '1.40'.
|
||||
ENDIF.
|
||||
IF iv_power = abap_true.
|
||||
lv_nightly = lv_nightly + '5.00'.
|
||||
ENDIF.
|
||||
lv_total = lv_nightly * iv_nights.
|
||||
IF iv_nights >= 7.
|
||||
lv_total = lv_total * '0.90'.
|
||||
ENDIF.
|
||||
IF lv_total < '30.00'.
|
||||
rv_fee = '30.00'.
|
||||
ELSE.
|
||||
rv_fee = lv_total.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user