• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

B&S: Requirement Clarification

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Sakkarin Nirattikulchai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sakkarin Nirattikulchai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andrew,
Nice talking to you and thank you. Your advice is helpful. I am glad to join this forum.



Regards,
Rin
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic