LLD - Design — Online Shopping Cart
Given the following code snippet, what will be the total cost stored in the Order after checkout?
product1 = Product(id=1, name='Pen', price=2)
product2 = Product(id=2, name='Notebook', price=5)
cart = Cart()
cart.addProduct(product1, 3)
cart.addProduct(product2, 2)
order = Order(cart)
order.checkout()
