Tuesday, April 5, 2011

Creating a list of selected items

Problem: I created an order form where the user could select which things they wanted to order, but I did not know how to store the items together so that I could have access to them and be able to manipulate as neccessary.

Impact: There was no way for me to view the group of items or do anything with them (ie: display, calculate totals, remove items).

Solution: I created a class call items and in it I created a List<items> which is able to hold a list of the selected items. This allows me to have direct access to them and be able to manipulate them as a whole or individually.

No comments:

Post a Comment