| Author |
B&S: Requirement Clarification
|
Sakkarin Nirattikulchai
Greenhorn
Joined: Sep 28, 2005
Posts: 3
|
|
Hello there, 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. 2.
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 ]
|
 |
Alex Sharkoff
Ranch Hand
Joined: Apr 11, 2004
Posts: 209
|
|
Hi Sakkarin , I am doing the same project and I understand the requirements you've listed exactly how you understand them:
Simply say the user can type "Fred" and "Freddy" and "Fredo" are returned.
Yes
if the user type "Fred" only "Fred" record will be returned if it is in the database.
Yes
|
Alex (SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJD 1.4)
|
 |
Sakkarin Nirattikulchai
Greenhorn
Joined: Sep 28, 2005
Posts: 3
|
|
Hi Alex, Congratulation, You are the first new friend in the forum x() (kidding).Thank you for your comment but, sorry, I still don't get it So, I decided to ask again with a new question: If the database file contains 3 records of contractor "Fred", "Fredy", and "Fredo", what will be returned if the user type "Fred" and press the button? Regards, Sakkarin N
|
 |
Andrew Monkhouse
author and jackaroo
Marshal Commander
Joined: Mar 28, 2003
Posts: 10816
|
|
Hi Sakkarin, 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 . Regards, Andrew
|
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
|
 |
Sakkarin Nirattikulchai
Greenhorn
Joined: Sep 28, 2005
Posts: 3
|
|
Hi Andrew, Nice talking to you and thank you. Your advice is helpful. I am glad to join this forum. Regards, Rin
|
 |
 |
|
|
subject: B&S: Requirement Clarification
|
|
|