132133134135136137138139140141142
double amount = 0; for (ShoppingCartItem scItem : items) { Product product = (Product) scItem.getProduct(); amount += (scItem.getQuantity() * product.getPrice().doubleValue()); } return amount; }