File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird Wording of search requirements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird Wording of search requirements " Watch "URLyBird Wording of search requirements " New topic
Author

URLyBird Wording of search requirements

William Smith II
Ranch Hand

Joined: Apr 26, 2007
Posts: 39
My assignment states "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. "

When it says "search the data for all records", does it mean that the user can search by all *fields* in the database? Or just city and hotel name?

I was going to only have two searchable fields being city and hotel name. The user can search based on:
(1) City only
(2) Hotel Name Only
(3) Both City and Hotel Name
If both city and hotel name are populated, then #3 is assumed.

Does this sound correct?

Also, I don't really have a primary key defined as I don't see a need for one. The search characteristics are pretty simple and the data file itself allows for multiple values. Is this a good assumption?
Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
Hi,

Yes, I think your are making the right assumption, this was also my view on the requirements,

Implementing 'AND' and 'OR' logic in Find method
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.

The distinction I made was that the two requirements are to be implemented in different layers of the application.

i.e You must implement the Data interface and therefore the find method should return the records that start with the search criteria supporting the ability to search EVERY field. Thereby keeping the data layer generic and not linked to search for location etc.

However in your business layer you need to implement the business requirement and perform additional filtering of the returned records to ensure they exactly match name/location fields.

Hope it helps

Jason
[ September 12, 2007: Message edited by: Jason Moors ]
Joe Richard
Ranch Hand

Joined: Aug 15, 2001
Posts: 76
Hi,

It was my understanding that all non deleted records would be searched. Any records matching the search criteria will have the record number returned in the array.

1) name
2) location
3) name and location

The key is the make the search function scalable for future enhancements.



Persistence equals goals
SCJD (In Progress), SCJP
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
Originally posted by Joe Richard:
Hi,

It was my understanding that all non deleted records would be searched. Any records matching the search criteria will have the record number returned in the array.

1) name
2) location
3) name and location

The key is the make the search function scalable for future enhancements.



Joe is right.. don't display deleted record and search method should allow more than two fields for future enhancement. most of the guys lost point because of this reason (includes me as well..)


SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: URLyBird Wording of search requirements
 
Similar Threads
GUI design
NX:Question about searching
URLyBird : about the requirement of search function.
NX: Two questions
Another MUST requirement interpretation question