• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search Criteria - 2 or 3 ??

 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think I almost have the GUI design using MVC pattern coded. In my SearchPanel,there are three JComboBox - "Origin Aiports", "Destination Airports", and "Carriers".
My question is:
Can I remove the Carriers as one of the criteria ?
According to Sun's assignment, user needs to be able to choose the origin and destion airposts. However, Sun gave an example of using Carrier as criteria.
From my view point,the Carrier is not a good criteria in combination with Origin and destination airports. User might choose a Carrier that does not have flight for origin and destination airports. In a case like this, we are actually create confusion for user instead of helping them.
Can I use only origin and destination airports as criteria ? Can remove carrier from search criteria ?
Thanks,
John Chien
 
Junilu Lacar
Bartender
Pie
Posts: 8762
81
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm not mistaken, the requirements ask that you provide a "flexible search". Removing the capability to search one or more particular fields would seem to be contrary to this requirement. Besides, this might force you to introduce some ugly code in criteriaFind(). Shouldn't you instead decide on a good strategy for handling cases where the user chooses a Carrier that does not have a flight for the origin and/or destination airports (e.g. display an error message of some sort or simply returning an empty results set)?
 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Certainly,I can do that.
However,if you are an end user, do you like to to see an error message popup or nothing shows up. Probably,NOT. The user will quit the application and complain about the application can not properly return the thing they want.
John Chien
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can I remove the Carriers as one of the criteria ?
According to Sun's assignment, user needs to be able to choose the origin and destion airposts. However, Sun gave an example of using Carrier as criteria.

The way I interpret the requirements is that your criteriaFind() method should be able to accept any of the fieds (origin, destination, carrier, price, etc.), but your GUI should only contain origin and destination controls.
Eugene.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eugene Kononov:
The way I interpret the requirements is that your criteriaFind() method should be able to accept any of the fieds (origin, destination, carrier, price, etc.), but your GUI should only contain origin and destination controls.
Seconded. I had the same interpretation -- in fact, given that Data is completely generic, it followed that my implementation of criteriaFind had to be completely generic as well, not even assuming the FBN table structure -- and the same client-side implementation. I don't think I lost any points on it.
- Peter
 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thansk.
Understood. I will have only origin and destination in my view. However, I will make criteriaFind() as generic as possible.
John Chien
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic