Find method says // Returns an array of record numbers that match the specified // criteria. Field n in the database file is described by // criteria[n]. A null value in criteria[n] matches any field // value. A non-null value in criteria[n] matches any field // value that begins with criteria[n]. (For example, "Fred" // matches "Fred" or "Freddy".) public int  find(String  criteria)
According to my understanding, these criteria can return multiple or all records which GUI shall display in table. I am using name and location as primary key so no duplication is allowed but definitely find operation can return multiple records.
The User Interface part of my assignment says "It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user " which means that the example of "Fred" or "Freddy" mentioned in the interface does not follow this EXACTLY matching criteria. Am I right?
That is correct. The requirements of the user interface are at odds here with the description of the functionality of the DB interface. It's up to you to make sure your application satisfies BOTH these criteria.
Joined: Sep 30, 2006
Thanks Jeroen for your reply! In my case, since I am using name and location as PK, if user enters some input for search then either ony one or no record should be returned. Although it required in assignment and I MUST stick to that, but it seems odd to use table to display only one/no record in this case.