This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Some people here have said that we should only do what the spec asks us to do, nothing more. That leads to my question:
Since my requirement spec says no where that I must implement any kind of input validation and further more says "Note that for this application, you should assume that customers and CSRs know their customer ids."
Will I lose points for lack of validation?
Should I prompt the user to retry or end the program on bad input?
I did not put input validation on the hotelname/city box... if they enter a non-existent hotel name, the search simply yields 0 results (the search criteria and number of matching records are contiuously displayed in a statusbar).
The best way IMHO to put input validation on that dialog box is to make a list of all hotel names and all cities in the database, and put them both in JComboBoxes. That's friendlier to your users [than my approach] but more work to implement.
SCJP 1.4, SCJD 1.4, SCWCD 1.3, ICSD:Websphere 5.1
Joined: Dec 07, 2004
Also, if you have the URLyBird assignment, keep in mind that the "Urlybird only takes reservations within 48 hours..." line in the intro text appears to be graded as a hard requirement (automatic failure) by some assessors, but not by others.