Filling the gaps in retail's digital basket

Report a typo

What would be appropriate names for the missing variables and method in the ShoppingCart class to accurately represent their purposes?

Fill in the gaps with the relevant elements
  ShoppingCart {
    public   calculateTotalCost(double[] itemPrices, [] itemQuantities) {
        double totalCost = 0.0;
        for (int i = 0; i < itemPrices.length; i++) {
            totalCost += itemPrices[i] * itemQuantities[i];
        }
        return totalCost;
    }
}
finalfloatpublicbytedoubleclassstaticintinterfaceprivate

Create a free account to access the full topic