Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
At the end of Lesson 10, “Using DataGroups and Lists,” you were left without a way to add or remove items from the ShoppingCart. With your newly refactored application, the buttons for adding and removing are now inside the ProductItem class; however, the ShoppingCart for the whole application is defined within the ShoppingView class. This means that you can no longer directly call the addItem() and removeItem() methods of the ShoppingCart instance.
Technically, it would be possible to make the shoppingCart property public and still access the ShoppingCart instance from the ProductItem through an expression like this: