Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bodgitt and Scarper questions

 
Sudhansu Pati
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Just wondering if you have noticed the following topics.
Topic 1 : The Background section is as follows
They take requests from home owners for a type of service, and offer the homeowner one or more contractors that can provide the required services.

Does that mean that, we have to allow multi-select in the JTable to select one or more contractors? Anyone has implemented multi-select ?


Topic 2 : Page 3 The User Interface section is as follows
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.
This line is in conflict with the DB interface specified in page 4. The following requirement is for the find() method.
// 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);
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11945
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Suds,
  • Do we have to allow multi-select in the JTable to select one or more contractors?
    I don't think so - the keyword IMHO is offer - in other words, if there are 3 records that match the user's criteria, we have to offer (display) them all to the user - the user can then choose which one they want.
  • The results of searching the database do not match the GUI requirements.
    You did not have a question here.
    Yes, there is a difference in what you should display versus what you get back from your search, but at least you can meet both the requirements of the Data search method, and the requirements of the GUI displaying the results. You can reduce the result set on the GUI side. Had the requirements been reversed (so Data's search returns exact match and GUI required 'starts with' matches) then you would have had a problem.


  • Regards, Andrew
     
    Ken Krebs
    Ranch Hand
    Posts: 451
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Suds,

    Topic 1 : The Background section is as follows
    They take requests from home owners for a type of service, and offer the homeowner one or more contractors that can provide the required services.

    Does that mean that, we have to allow multi-select in the JTable to select one or more contractors? Anyone has implemented multi-select ?

    My assignment said the same thing. It is however just a general statement of the requirements. It does not say that you have make that capability possible in a single user interface gesture. I did not implement multi-selection and scored well.

    Topic 2 : Page 3 The User Interface section is as follows
    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.
    This line is in conflict with the DB interface specified in page 4. The following requirement is for the find() method.
    // 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);

    It really isn't a conflict as they are just different requirments for 2 distinct parts of the application, the ui and the persistence sections. My solution went a little beyond the ui requiremnts and offered up some of the extra capability present in the persistence section. If you wish to see a more complete description of my design, check the thread, "NX: Notes on a design that passed 389/400".
    Good luck,
    kktec
    SCJP, SCWCD, SCJD
     
    Dave Knipp
    Ranch Hand
    Posts: 146
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Ken and Andrew,
    I had the same question as Suds and was curious why they would have stated it like this. I currently have my search within the gui returning what the find method describes, but found myself questioning this sentence from the instructions.doc
    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.

    So what i understand from both of you is that you should grab the search results from the find method and then filter them again so that the search query EXACTLY matches the contractor's name and/or location. Ken, did you make this EXACTLY match case sensitive? I'm thinking about not making it case sensitive so the user won't have to put in all the upper case letters etc. Let me know if both of you think this is a viable solution.
    Thanks,
    Dave
     
    Bill Robertson
    Ranch Hand
    Posts: 234
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Dave,
    Just a reminder. The instructions, and this is a MUST instruction,
    states:

    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.

    Notice for the name and location search they say EXACTLY. Which would mean
    case sensitive. But your other search could go either way.
     
    Dave Knipp
    Ranch Hand
    Posts: 146
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bill,
    That is is a good point, the MUST is really stressed so i guess i should go with enforcing case. Good suggestion.
    Thanks,
    Dave
     
    Andrew Monkhouse
    author and jackaroo
    Marshal Commander
    Pie
    Posts: 11945
    212
    C++ Firefox Browser IntelliJ IDE Java Mac Oracle
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Dave,
    I had the same question as Suds and was curious why they would have stated it like this.

    Possibly just because they want to simulate a typical specification that you will find in the real world. Which means the specification will have omissions, badly worded sections, and sections that are wrong.
    I'm thinking about not making it case sensitive so the user won't have to put in all the upper case letters etc. Let me know if both of you think this is a viable solution.

    I agree with Bill that you must do an exact match, so it would be case sensitive.
    One thing you might want to consider though, is whether you can offer a drop down list of valid searchable items. That way the user does not have to manually type in selection criteria.
    Regards, Andrew
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic