Question: Using the case study in question 3 . 1 above Implement the following: a . Define a delegate and event to notify when an item

Using the case study in question 3.1 above Implement the following:
a. Define a delegate and event to notify when an item is added to the cart.
b. Define a delegate and event to notify when a discount is applied to an item.
c. Main Method with the following:
Instantiate the ShoppingCart and Product objects.
Subscribe to the events for item addition and discount application.
Create Products
Add Products to Cart (Trigger the appropriate event)
Display Cart Items and Cart Total (Before Discounts)
Apply Discounts on Cart Items Based on Category (Trigger the appropriate event)
Display Cart Items and Cart Total (After Discounts)
(25 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!