• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

criteria issue need clarification

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I found this in the assignment requirement

The user should be able to select the origin and destination of flights, and the display should update to show only flights that satisfy those criteria. The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature

what does it exactly mean? Why it mention the origin and destionation fields discriminatively?
In my GUI, i have a JTextField to get user input for the criteria string and i do all the search based on this string. Should i still need create a seperate dialog to handle the origin & destination search? Or i need not handle the search except that of origin & destination fields?
Need your opinion.
James Du
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I would say that you have a lot of faith in your users. Those ID ten T's that they are.
I wouldn't expect my users to have to go to training to learn the exact manner to type in a criteria String. No I would provide either a JTextBox or a JComboBox that has corresponding JLabels. One for Origin and one for Arrival. So that the use only has to select the name of the airports, then your code can format the string to be correct.
I think in the requirements they put those two to state the minimum necessary criterias to the user. However, I actually got further confused when they displayed a sample criteria string and it included Carrier. So I chose to use those three fields in JComboBoxes.
Mark
 
James Du
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark, thanks for quick response.
I agree with you in some extent, but pls. look at this requirement.
In the event of an invalid field name being provided as part of the criteria the behavior of this method is the same as if no records matched correctly specified criteria.
If the criteria string formated by code, how comes the chance of invalid field name ?
Another confusion in the requirement
The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature
what does it exactly mean?
I take it as, if my user provide the criteria string such as origin=*, destionation='a' , I should give my user all the flights whose destionation='a' ignoring its origin. my confusion is that, in my criteriaFind method, do i need to parse the '*' as a wild-card? or I only need to design the GUI in the way that it could express the user's desire and do not pass the origin=* to criteriaFind method at all?
Pls. take a breath, i have other questions.
1. In my design, i provide all the data to users at the startup, for i think the blank JTable is too unfriendly. But in reallife project i think it's unpratical, no one would like waiting thousands of records to load , what's your opinion?
2. In the criteria formating dialog, there's 2 way to provide user to select origin or destination:
1) JTextField
2) JComboBox listing all the option
the first is easy but unfriendly, the latter one is friendly but it need to traverse the whole table to give the options. which one is more favorable?
Regards
James Du
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I caught my breath.

If the criteria string formated by code, how comes the chance of invalid field name ?


By putting it in code you take this problem out of the equation, unless you write bum code.

what does it exactly mean?


"it" is an english word that is sometimes used to ambigously refer to something, that the user of the word thinks that the other person know what they are referring to.

OK, enough on that. I think that means that in you GUI, you need to provide a means for the user to either select an individual item, or they can select something that will say "Hey I want all of that". Like in mine the first item in the JComboBox for carrier is "All Carriers", and it is the default value.

Now to the second parts.
1. I did the same I display all the flights. Just because I had trouble starting it out with nothing, and then searching. And for this assignment that worry is not yours.
Got to run for a sec, I'll be back later to finish answering.
Mark
[ April 12, 2002: Message edited by: Mark Spritzler ]
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I'm back, had to have a guy run through our Application to get a feel for the system. We are re-writing it and are looking at out-sourcing it overseas. Anyone hear of NetKraft in Bangalore India? I digress.

2. I can't comment on which is most favorable to the assessor. And any comment on it would 100% be my preference, and arguable by anyone. I prefer the JComboBox. It does cause me code to get the Unique values, but I think that code was easier than having to worry about the user typing in bad data, sending the string to the server, and then. OK that's my 2 cents.
Which ever way you choose will be fine.
Mark
 
today's feeble attempt to support the empire
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic