SCJP 1.4 100%
SCJD 99.5%
Originally posted by Zonglin Li:
If I want to get all the records, I could just set the criteria to: null null null null null. So I don�t need to create a method to get all the records. Do you think so?
SCJP 1.4 100%
SCJD 99.5%
Originally posted by jin Young:
Hello, i append question, thanks.
The requirement of search function may only contains some of the fields. For example name and location is required to search, so the criteria[] array may only need to contain the two element? is it not neccessary to contains all fields in the db data file?
Thanks a lot.
SCJP 1.4 100%
SCJD 99.5%
The user interface for this assignment must satisfy the following 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.
// 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".)
SCJP 1.4 100%
SCJD 99.5%
Which one should I implement? It would very silly to implement the db in a way that finds partially matched criterias and then filter those results to provide exact matches only.
SCJD working on B&S