// Data file Joe 123 Main St. 111-222-3333 Fred 456 Secondary St. 444-555-6666 Ed 789 Tertiary St. 777-888-9999 // Index file Joe 0 Fred 1 or 1 * record size Ed 2 or 2 * record size
Cymae wrote:What do you mean "How does it fit in"? It fits in as described by the assignment. The index file stores the hashtable and the data file stores the record objects.
Ok, and how does that fit in with my hash table and record object?
and the files have to be in byte...not strings printed to a file (just to clarify everyone understood that)I have no idea what you're saying here. Sounds like you need to talk to you instructor and get clarification on your requirements.
Cymae wrote:If I understood your assignment correctly, yes.
ok...so i just whack the hash table as one big thing into my index file, and then use the output stream to write a string of "name" "address" "phone number" into my data file?
So what does my hash table store? it stores the index of the records i have in the data file?Yes. The hash table--and the index file where you store it--tells you where in the file to find, for instance, "Mary".