1.3 KiB
Refactor the class {{P}}GLASSES_PRICER. The class name stays the same. The behavior must stay the same. The legacy implementation is the specification of the behavior. For every input, the method PRICE must return the same value as the legacy method. Do not add a rule. Do not remove a rule. Do not correct a rule. PRICE returns a price in the currency of the order.
The class stays public and final. It keeps its public constructor without parameters. Keep the public types TY_AMOUNT, TY_LENS, and TY_COAT. Keep the method PRICE with the same parameter names, parameter types, and sequence: importing IV_FRAME (TY_AMOUNT), IV_LENS (TY_LENS), IV_COAT (TY_COAT), IV_QTY (TYPE i); returning RV_PRICE (TY_AMOUNT). Do not add public methods or public attributes. Do not create other objects.
Do not change the program {{P}}OPTIC_QUOTE_RPT. Do not change the public interface of the class.
Release target: ABAP Platform 2025 (SAP_BASIS 816). Use Clean ABAP. One method does one thing. Method length below 40 statements. No deep nesting. No magic numbers: use constants. No duplicated code. No dead code. No global variables. No comment that restates the code.
The class must be active and have no syntax error. The hidden tests must pass. Write your own ABAP Unit tests for the class.