SCJP 1.4, SCJD, SCWCD 1.4
I think you should ask, can the caller of this method do anything to recover from this (or even the end user)? (checked)
Could it be an illegal argument (i.e. they've broken the contract implicit to calling this method)? (error)
The action that you take depends on the answer!
I didn't see any reference to ensureing that the customerID MUST be 8 digits (wouldn't less still work?)
Of course a real "cop-out" solution is just to document that you'll leave it up to the systems administrator to remove any rooms that don't meet the 48hr criteria and then ignore it from then on
because I thought that it should really contain 8 numbers. But perhaps you're right and 1 - 7 numbers are ok, too?
Other opinions?
....8-digit number..
I think since sun didn't require us to must do it, but In my design, I want to do it and also write it in my choices.txt. Because in the real word, digit-number ID commonly is equal length, e.g. the book digit mark(ISBN 7-5084-1055-6), telephone's number, post code and so on.
Because in the real word, digit-number ID commonly is equal length, e.g. the book digit mark(ISBN 7-5084-1055-6), telephone's number, post code and so on.
SCJP 1.4, SCJD, SCWCD 1.4
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by Andrew Monkhouse:
In the States I believe than can vary between a 5 digit number and a 5-3 number (my memory is hazy on how many digits are in the second section).
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|