Re: hw4 #3

9 views
Skip to first unread message

Betty O'Neil

unread,
Mar 16, 2012, 11:31:51 AM3/16/12
to Jordan Hourani, cs31...@googlegroups.com
You can use the ssn both as a key and as a field of the object being
mapped to. See class 6 "database-like lookups" discussion, where the
product name is both the key and a field of the InventoryItem.

Yes, your crunching plan sounds OK.

On Fri, 16 Mar 2012, Jordan Hourani wrote:

> Hi Professor,
>
> I have a question about #3. I am using a map for the large data structure,
> and I know that I want a client object as a value that will hold client
> data and the prefs Set for them. But I am having a hard time coming up with
> a key that makes sense. I was going to use the ssn int or name string, but
> that data will be in the client object. Also, I will be passed a client
> object in findBestMatch, so I was thinking I would crunch that client
> objects prefs Set with every other clients in the map until I get the
> largest Set. So that the largest intersection set created by these
> comparisons should be the best match. Is this the right approach to this?
> Thank you!
>
> Jordan
>

Reply all
Reply to author
Forward
0 new messages