Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Customer ID

 
Muhammad Shafique
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Specifications says:

The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale.

Does it mean that customer id MUST have all eight digits without leading zeros? OR at max. 8 digits and min. 1 (excluding zero)?

It seems sticking to all 8 digits is a better option. Please comment!

Thanks
Shafique
 
Brian Kelly
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Muhammad,

Funnily enough, I coded that yesterday.

I read it that it MUST be 8 digits (including 0), so "00000001" is okay but "1" is not.

I just used a JFormattedTextField with MaskFormatter("########").

And "0" is a digit according to MaskFormatter (the API says # "is Any valid number, uses Character.isDigit").
 
Muhammad Shafique
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brian,
JFormattedTextField is cool for text formatting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic