This is my first time posting to javaranch but I've used it as my main source for years. I am not about to work on SCJD assignment and try to cleary understand the requirement.
I've seen there are 2 quotes conflicted in the requirement.
1. In the interface I must implement, the find method is commented like this
// 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)
Simply say the user can type "Fred" and "Freddy" and "Fredo" are returned.
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.
it said "exactly match values specified by the user" which means that if the user type "Fred" only "Fred" record will be returned if it is in the database.
Anybody could help me on this?
Thanks in advance,
Rin [ September 28, 2005: Message edited by: sakkarin nirattikulchai ]
It might help if you consider that there are multiple different specifications that you have to adhere to. If you were working in a larger organization, you might have one team work on the database, another work on the server, and another work on the GUI (or perhaps multiple teams for multiple user interfaces - Swing, Web, Web Services ...). Since there are multiple teams (or mini-assignments) then each team will have their own requirements to fulfill, and it is possible that the team working on the database may have different requirements (hopefully less restrictive) than those teams working on client interfaces.
The specification for the Database team says that if you do a search on "Fred", then "Fred", "Fredy", and "Fredo" will all be returned.
However the specifications for the Swing team says that only an exact match should be displayed - so the Swing team will have to discard the "Fredy", and "Fredo" responses as they are outside of the original search parameter.
Some candidates search the entire database first, and only allow the user to select "Fred" or "Fredy" from a list - I will let you think of benefits and problems with this approach on your own before taking it further .
I mentioned before that it might help to think of the specs as written for three teams. Another popular way of thinking of the specs is that they were written to simulate typical semi-clueless customers. Sun have actually agreed with that statement in the past .