Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Contradiction in B&S

 
Mandy Bowman
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

The specification for B&S states that the interface _must_ allow the user to search "... for records where the name and/or location fields exactly match values specified by the user". The contradition is that the find method states that "A non-null value in criteria[n] matches any field value that begins with criteria[n]". Now, when the user performs a search we call the find method which will return to us records that begin with what he asked for. But the document says that we _must_ return records that exactly match. Our method returns too much information. What have others done in this instance?
 
chris bajada
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mandy,

I have just done B&S. What the assignment states there is that your findByCriteria() method should return those records which "A non-null value in criteria[n] matches any field value that begins with criteria[n]". (fred matches freddy)

However that is telling you that before the search results are sent to the GUI class to show them in the JTable, you need to re-filter them for those records which EXACTLY match the user's request.

I.e. GUI.java - MiddleClass.java - Data.java - DBFile

Data.java gets parital matching records from dbfile and passes them to your middleclass. The middleclass re-filters those results and passes only those records exactly matching the user's request to the GUI.

That's how it should be done. The middleclass i portrayed there should be the client class which performs the logic and calls the data.java methods
 
Mandy Bowman
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Chris, I'm just wondering if that is the interpretation that other people have come up with for this requirement or has someone else thought of doing it differently?
 
rinke hoekstra
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris is right. This is not necessarily a contradiction. The find method must return records according to the accompanying comment, and the user interface filters these results to records which strictly match.

However, this subject has been repeatedly covered on this forum. Did you perform a search on it?
 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mandy,

I just started studying my B&S requirements and I had the same question, thanks for posting.

I just figured out how to search for past B&S posts so I thought I'd pass it along. You need to use the search string B\&S to find B&S in a header or body.

-=bill
 
Mandy Bowman
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks i shall do that
 
Gennadi Oreper
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody!
sorry for my english (is very poor)... But:
I am at last steps on my B&S assignment and have following:

"...fields exactly match values specified by the user." I see this for me as "no wild cards are allowed to input" and the db interface is so passed with the find method "...matches any field value that begins with criteria...". I think, if the user searches for name (32 length) and/or location (64 length), they want no typing entire names.
See somebody this wrong?

Thanks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic