data structure question

veronica86

Member
Joined
Mar 3, 2005
Messages
14
Location
Iowa
Programming Experience
3-5
hello,

I am designing an ASP.NET web application and have 1 class (PurchaseOrder) that contains another class (Item) as an attribute. (Using aggregation)

The Item class has 2 attributes (name & quantity). I am trying to find the best data structure to hold many instances of Item within the PurchaseOrder.

Each item has 2 attributes. I was thinking an ArrayList. Would I need a 2 dimensional ArrayList, if that exists?

thanks for any advice!!
 
Depends on how you want to do it, if you want to call a new PO everytime you need one then you wouldn't need the array. If you call a global PO then you could use an arraylist (which you could stick an arrayinto) If you use an arraylist you'll need to keep track of which PO is which.
 
Back
Top