shipCostCents = FLATFEECENTS + (CENTSPERPOUND shipWeightPounds);

Check the final answer first, then review the worked steps.

Answer

\(shipCostCents = FLAT_FEE_CENTS + (CENTS_PER_POUND * shipWeightPounds);\)

Approach

shipCostCents = FLAT_FEE_CENTS + (CENTS_PER_POUND * shipWeightPounds);

Step-by-step solution

  1. Identify the calculation line: The code calculates the total cost using the formula: shipCostCents = FLAT_FEE_CENTS + (CENTS_PER_POUND * shipWeightPounds);.
  2. Substitute the known constants: We have FLAT_FEE_CENTS = 75 and CENTS_PER_POUND = 25.
  3. Write the final expression: The line to complete the calculation is shipCostCents = FLAT_FEE_CENTS + (CENTS_PER_POUND * shipWeightPounds);.