Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
72
tasks_gen/train/G1056/faulty/m2_tyre_checker.clas.abap
Normal file
72
tasks_gen/train/G1056/faulty/m2_tyre_checker.clas.abap
Normal file
@@ -0,0 +1,72 @@
|
||||
CLASS {{p}}tyre_checker DEFINITION
|
||||
PUBLIC
|
||||
FINAL
|
||||
CREATE PUBLIC.
|
||||
|
||||
PUBLIC SECTION.
|
||||
METHODS constructor
|
||||
IMPORTING is_vehicle TYPE {{p}}if_tyre_order=>ty_vehicle.
|
||||
|
||||
METHODS check_order
|
||||
IMPORTING is_order TYPE {{p}}if_tyre_order=>ty_order
|
||||
RAISING {{p}}cx_tyre_qty
|
||||
{{p}}cx_tyre_size
|
||||
{{p}}cx_tyre_load
|
||||
{{p}}cx_tyre_speed.
|
||||
|
||||
PRIVATE SECTION.
|
||||
DATA ms_vehicle TYPE {{p}}if_tyre_order=>ty_vehicle.
|
||||
|
||||
METHODS check_qty
|
||||
IMPORTING is_order TYPE {{p}}if_tyre_order=>ty_order
|
||||
RAISING {{p}}cx_tyre_qty.
|
||||
METHODS check_size
|
||||
IMPORTING is_order TYPE {{p}}if_tyre_order=>ty_order
|
||||
RAISING {{p}}cx_tyre_size.
|
||||
METHODS check_load
|
||||
IMPORTING is_order TYPE {{p}}if_tyre_order=>ty_order
|
||||
RAISING {{p}}cx_tyre_load.
|
||||
METHODS check_speed
|
||||
IMPORTING is_order TYPE {{p}}if_tyre_order=>ty_order
|
||||
RAISING {{p}}cx_tyre_speed.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}tyre_checker IMPLEMENTATION.
|
||||
METHOD constructor.
|
||||
ms_vehicle = is_vehicle.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD check_order.
|
||||
check_qty( is_order ).
|
||||
check_size( is_order ).
|
||||
check_load( is_order ).
|
||||
check_speed( is_order ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD check_qty.
|
||||
IF is_order-qty < 1 OR is_order-qty > 4.
|
||||
RAISE EXCEPTION TYPE {{p}}cx_tyre_qty.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD check_size.
|
||||
IF is_order-width_mm = ms_vehicle-width_mm
|
||||
OR is_order-profile_pct <> ms_vehicle-profile_pct
|
||||
OR is_order-rim_inch <> ms_vehicle-rim_inch.
|
||||
RAISE EXCEPTION TYPE {{p}}cx_tyre_size.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD check_load.
|
||||
IF is_order-load_index < ms_vehicle-load_index.
|
||||
RAISE EXCEPTION TYPE {{p}}cx_tyre_load.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD check_speed.
|
||||
IF is_order-speed_kmh < ms_vehicle-speed_kmh.
|
||||
RAISE EXCEPTION TYPE {{p}}cx_tyre_speed.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user