alreadyused
Regular
- Joined
- Jan 13, 2006
- Messages
- 69
I am needing some direction. I am going to describe this as toys because I think that would be the easiest way. Sorry, this is gonna be wordy; better get out your pillow!
I have a large room that holds a lot of large boxes that will eventually hold an indeterminate amount of toys. While these toys are under construction, they have an indeterminate amount of prototypes. So:
My thought is:
What I'm having a problem with is how to decide if I need to make a new object. For example, how do I look through the array list and determine if that object is in there already?
Then, also, is it going to matter what order I go in? Meaning, do I need to:
create all of the Revisions first,
then Determine if a Toy exists to hold the revisions
then Determine if a Box exists to hod the toy?
Or should I do it the other way around? We will eventually have thousands of boxes holding handfuls of toys each, and each toy having multiple (usually no more than five, but flexible) revisions.
Any ideas/suggestions/comments/"you idiot why are you doing it that way"'s are more than welcome!
Thanks!
Damon
I have a large room that holds a lot of large boxes that will eventually hold an indeterminate amount of toys. While these toys are under construction, they have an indeterminate amount of prototypes. So:
and so on.ROOM
|
|_BOX1
|___ToyA
| |___ToyA-RevA
| |___ToyA-RevB
| |___ToyA-RevC
|
|___ToyB
|___ToyB-RevA
|___ToyB-RevB
My thought is:
Code:
'VB.Net 03 Developer
Public Class clsRoom
Private listBoxes as ArrayList 'contains Box objects
Private objBoxes as New clsBox
'Methods and Properties
End Class 'clsRoom
Public Class clsBox
Private listToys as ArrayList 'contains Toy objects
Private objToy as New clsToy
'Methods and Properties
End Class 'clsBox
Public Class clsToy
Private listRevs as ArrayList 'contains Revision Objects
Private objRev as New clsRev
'Methods and Properties
End Class 'clsToy
Public Class clsRev
Private Var1, Var2, ... as ... 'Revision variables
'Methods and Properties
End Class 'clsRev
What I'm having a problem with is how to decide if I need to make a new object. For example, how do I look through the array list and determine if that object is in there already?
Then, also, is it going to matter what order I go in? Meaning, do I need to:
create all of the Revisions first,
then Determine if a Toy exists to hold the revisions
then Determine if a Box exists to hod the toy?
Or should I do it the other way around? We will eventually have thousands of boxes holding handfuls of toys each, and each toy having multiple (usually no more than five, but flexible) revisions.
Any ideas/suggestions/comments/"you idiot why are you doing it that way"'s are more than welcome!
Thanks!
Damon