|
-
May 15th, 2003, 02:21 PM
#1
Thread Starter
I wonder how many charact
Challenge : (can't describe it in header)
Here it is.
Say you have a collection of car objects:
- Type Descriptor TypeID
FORD ESCORT 3
HONDA CIVIC 1
HONDA CRX 1
TOYOTA 4RUNNER 2
TOYOTA CAMRY 2
Say this collection is called MySaleCollection, which contains encompasses a sale containing cars from any amount of manufacturers.
Challenge:
Write a function that would take the MySaleCollection and generate a collection of CarCollections with EACH CAR COLLECTION ONLY CONTAINING cars from the same manufacturer...
so the function returns a collection of collections... with each collection only containing that certain manufacturer's cars....
The goal is to pass an Invoice into this function, and have the function return a collection of seperate Purchase ORders.. each only containing cars from that manufacturer...
Last edited by nemaroller; May 15th, 2003 at 02:54 PM.
-
May 15th, 2003, 03:52 PM
#2
Fanatic Member
Does the return have to be a collection of collections, or can it be an array of collections?
-
May 15th, 2003, 04:01 PM
#3
Thread Starter
I wonder how many charact
I suppose it doesn't matter...
-
May 15th, 2003, 04:18 PM
#4
Thread Starter
I wonder how many charact
I think I have it figured out anyway.... using entirely collections...
-
May 15th, 2003, 04:41 PM
#5
Fanatic Member
Neat, I was a bit stuck on how to declare a collection of collections.
-
May 15th, 2003, 04:52 PM
#6
Thread Starter
I wonder how many charact
VB Code:
Dim Parent as New Collection
Dim Child1 as New Collection
Dim Child2 As New Collection
Parent.Add(Child1)
Parent.Add(Child2)
-
May 15th, 2003, 05:15 PM
#7
Fanatic Member
Ah, and you were adding Car objects to a generic Collection? I thought you made your Car object inherit collection (woops).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|