• 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

User Requirement

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know this question has been ask a few times, but I just want to double confirm.

instructions.html wrote:The user interface for this assignment must satisfy the following criteria:
• It must be composed exclusively with components from the Java Foundation Classes (Swing components).
• 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 must present search results in a JTable.
• It must allow the user to book a selected record, updating the database file accordingly.

Your user interface should be designed with the expectation of future functionality enhancements, and it should.




According to the above, I merely need to provide 2 UI functions?

1) Search database for a list of rooms?
2) Update a record with customer number?

Or should i create other functions like add and edit record?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's easy: you have to meet all must requirements (so be able to search for rooms and book a room), but you may implement more functionality if you want (although you are guaranteed not to receive extra credit for this extra effort)
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so what is the point of creating more UIs =x

heehee.. I'm going to try and meet the basic requirement first.

I have a problem creating UI now.. is donkey years since I created UI from scatch.. abit lost =x how should I start? any good resource to read up on?

[edit] removed quote of a complete post (has no added value)
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:so what is the point of creating more UIs =x


Some people just want to deliver a fully-fledged UI.

Ixus See wrote:how should I start? any good resource to read up on?


There will be plenty on the internet and Andrew's book also provides you some basics.
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

instructions.html wrote: 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.



1) when it says search the data for all records. Does it mean a function that returns all the records in the database?

2) it says where the name and/or location fields exactly match values specified the users. Does it means I returns all records

a) matches the name and location provided exactly?

b) What if only the name matches exactly and the location is provided doesn't, do i return those too?

 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1/ all records is of course all valid (non-deleted) records. It makes no sense to return records which are deleted

2/ in the table with results you should only see these records which exactly matches the search criteria
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just add in radio buttons to allow the selection for AND and OR search

now the user is able to search for the following

1) match name AND Location
2) match name OR Location
3) match name only (leaving out the location)
4) match location only (leaving out the name)

http://imageshack.us/photo/my-images/828/71496994.jpg/
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see you used a seperate button to view all hotels. What happens when I leave both search fields empty and hit the search button?
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:I see you used a seperate button to view all hotels. What happens when I leave both search fields empty and hit the search button?



it prompts the user to enter name or location ;)

Am I good to go? I am currently doing my javadoc, i really hate doing more code change.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you do it in my application, all valid records are returned, so no need for the extra button. But that solution is also a valid approach.
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:When you do it in my application, all valid records are returned, so no need for the extra button. But that solution is also a valid approach.




OH! ermmm valid but the user needs to know that leaving both empty will retrieve all the records?

what if I select "AND" operation and I leave both name and location empty, what does your design returns?
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:OH! ermmm valid but the user needs to know that leaving both empty will retrieve all the records?


You have a user guide to instruct the user

Ixus See wrote:what if I select "AND" operation and I leave both name and location empty, what does your design returns?


I don't have a seperate radio button to select and/or, just 2 search field and 1 search button
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:

Ixus See wrote:OH! ermmm valid but the user needs to know that leaving both empty will retrieve all the records?


You have a user guide to instruct the user

Ixus See wrote:what if I select "AND" operation and I leave both name and location empty, what does your design returns?


I don't have a seperate radio button to select and/or, just 2 search field and 1 search button



You have a user guide to instruct the user >>> I swear to God, The last engineer that who told me that got a ear full! but that is another story for another day.

I assume your assignment doesn't require you to do a AND/OR search?

anyway am I good to go?

 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:I assume your assignment doesn't require you to do a AND/OR search?


I have exactly the same sentence in my instructions as you
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmmm in your opinion does my implementation meets the requirement?

Does it mean you didn't cater for the situation where by user enter name and location and the application display all the result that match name or location?
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:hmmm in your opinion does my implementation meets the requirement?


Yes.

Ixus See wrote:Does it mean you didn't cater for the situation where by user enter name and location and the application display all the result that match name or location?


You can't do it with one search, but you can simulate it wih 2. So it's not possible to show both results in one table, but it's not true that it can't be done at all (because you can search for name or location)
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:

Ixus See wrote:hmmm in your opinion does my implementation meets the requirement?


Yes.

Ixus See wrote:Does it mean you didn't cater for the situation where by user enter name and location and the application display all the result that match name or location?


You can't do it with one search, but you can simulate it wih 2. So it's not possible to show both results in one table, but it's not true that it can't be done at all (because you can search for name or location)



why can't do you do it in one search?

I manage to do it.

my search criteria is coded like this.. now I am getting more confuse

[edit] do not post actual code snippets
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:why can't do you do it in one search?


Maybe I explained it wrong. Of course I could do it in one search: it's just changing the search logic a bit. But I wanted a simple GUI and adding radio buttons for and/or adds extra complexity and makes the search less intuitive
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but you won't meet the requirement of AND/OR operator.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:but you won't meet the requirement of AND/OR operator.


Yes, I do. Otherwise I would not have passed. The given sentence just says user should be able to search on name AND location, name OR location. So in my opinion that's 3 possible searches:
  • name and location
  • only name
  • only location

  • In my interpretation it does not mean name or location together. And I also think that kind of search will be very rarely used in real world. A user wants to go to a Hilton hotel (name only), to a Hotel in Paris (location only) or to Hilton hotel in Paris (name and location), but won't ask for Hilton hotel or a hotel in Londen (name or location).

    But as I said already: your approach is just as good as mine, they are both meeting the requirements.
     
    Ixus See
    Ranch Hand
    Posts: 160
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    damn I shouldn't had change in the first place #$^#$%^$^&

    just refactor back to orginal implemenation! thank god there is SVN to help keep my codes version controlled!
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Ixus See wrote:just refactor back to orginal implemenation! thank got there is SVN to help keep my codes version controlled!


    I don't see a reason to do so. You interpreted things your way, I my way. Both are good, so why not stick to your implementation?
     
    Ixus See
    Ranch Hand
    Posts: 160
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Roel De Nijs wrote:

    Ixus See wrote:just refactor back to orginal implemenation! thank got there is SVN to help keep my codes version controlled!


    I don't see a reason to do so. You interpreted things your way, I my way. Both are good, so why not stick to your implementation?



    there is less coding for your way ;)

    the service and MVC layer is much thinner ;)

    I only have 4 methods in service and MVC - model layer if I stick to your implementation.. less methods = less complexity!

    Now you understand why I would fail the assignment, if I didn't ask simple questions, I will be implementing everything, the code complexity itself would have cause me lots of points. I guess is also part of my job to question everything even it is logical.
     
    Ranch Hand
    Posts: 101
    Netbeans IDE Oracle Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I took record searching to another level a bit more advanced than is basically required (though I did so out of ignorance of what is required). I believe I'll be getting a pat on the back for that and not a knock on the head. Today makes exactly four weeks that I took my essay exam. This result is taking TOO long please.
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Ixus See wrote:there is less coding for your way ;)

    the service and MVC layer is much thinner ;)


    Both valid reasons.

    Ixus See wrote:Now you understand why I would fail the assignment, if I didn't ask simple questions, I will be implementing everything, the code complexity itself would have cause me lots of points. I guess is also part of my job to question everything even it is logical.


    Again not true. You might indeed lose some points, but you won't fail. You'll only fail if you have a big issue with your application (e.g. Data class not capable of handling concurrent requests) or violated any of the must requirements.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic