< Sun's description >
The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale.
Why they can say clearer? Doesn it mean when the book button is pressed,
the random 8 digit number created and inserted into the column of customer holding? or Let Customer service Representative fill the arbitrary 8 digit number?
public int[] find(String[] criteria);
/1./ returns an array of record numbers that match the specified critieria.
/2./ Field n in the database file is described by criteria[n].
/3./ A null value in criteria[n] matches any field value.
/4./ A non-null value in critieria[n] matches any field value that begins with criteria[n]. (For example, "Fred", matches "Fred", "Freddy.")
I understand up to 1 and 2. what they said 3 and 4 confused with 2.
let's say table has 6 column :
No_0 | No_1 | No_2 | No_3 | No_4 | No_5 |
___________________________________________________
criteria[0] = null; // No_0 field
criteria[1] = null; // No_1 field
criteria[2] = null; // No_2 field
criteria[3] = null; // No_3 field
criteria[4] = null; // No_4 field
criteria[5] = "Fred"; // No_5 field
find method spec has input parameter as array of
string.
it seems array size is the number of database field.
1 and 2 describes as if seperate search for each field.
And then 3 and 4 saying matches any field... Then why it has to be
in this seperated array criteria?
It will be really appreciated your opinion.
[ September 30, 2007: Message edited by: paul seldon ]