Skip to content

Commit 4e30193

Browse files
Update Cart.java
1 parent ede37bd commit 4e30193

File tree

1 file changed

+2
-1
lines changed
  • clean-architecture/src/main/java/com/iluwatar/cleanarchitecture

1 file changed

+2
-1
lines changed

clean-architecture/src/main/java/com/iluwatar/cleanarchitecture/Cart.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public Cart(final Product prod, final int qty) {
5959
* @return the total price of the products in the cart.
6060
*/
6161
public double getTotalPrice() {
62-
return product.getPrice() * quantity;
62+
int getTotPrice = product.getPrice() * quantity;
63+
return getTotPrice;
6364
}
6465
}

0 commit comments

Comments
 (0)