// 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)
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.
in my criteria array has 3 elements.
criteria= either (name and location) or (name or location)
is it okay ?
should I provide some more search criteria ?
there are two requirement for your search implementation one of them find in the javadoc provided and another in the requirement as client side searches,
read the java doc properly you see that : "Field n in the database file is described by
// criteria[n]." so the criteria size is as the fields size.
you must implements the search method as the java doc say. then think on the client side searches requirements.
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care: