*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes leading zeroes, customer reference number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "leading zeroes, customer reference number" Watch "leading zeroes, customer reference number" New topic
Author

leading zeroes, customer reference number

Lucy Sommerman
Ranch Hand

Joined: Nov 25, 2004
Posts: 61
If customer has 8 digit number, is 00000001 a valid number?

or not...thanks
Daniel Simpson
Ranch Hand

Joined: Sep 02, 2004
Posts: 181
Originally posted by Lucy Sommerman:
If customer has 8 digit number, is 00000001 a valid number?

or not...thanks


I'm going by what the documentation says: that the CSR's know what the customer's id number is. The only validation I have is to check and make sure that the id is 8 digits long, not a digit more or less. I don't think we need to question whether 00000001 is valid or not, because we are assuming they know what it is. However, I would check for the 8 digit length though. Just my advice.


SCJP 1.4<br />SCJD 1.4
Murali Kurukunda
Ranch Hand

Joined: Oct 20, 2003
Posts: 36
I know my documentation says the customer ID is an 8 digit number. Is the 8 digits a hard requirement? or can it be less than 8 digits? something like 123.
Daniel Simpson
Ranch Hand

Joined: Sep 02, 2004
Posts: 181
I would interpret it as 8 digits long. Not 3 or 4. But that's just my opinion.
Ellen Zhao
Ranch Hand

Joined: Sep 17, 2002
Posts: 581
Originally posted by Lucy Sommerman:
If customer has 8 digit number, is 00000001 a valid number?

or not...thanks


Hi Lucy,

which assignment are you doing? Does your instruction say you have to deal with the customer number? As for my assignment, the instruction does tell how many digits the customer number has, but it clearly tells you that you don't have to deal with this field, the care should be taken by the customers themselves. My understanding is, I could just leave enough space for the digits somewhere when needed, but no verification in my program. How do others think?


Regards,
Ellen
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi everyone,

Regarding the size of the customer ID, you might want to look at the topic "Questions about contractors answered by sun".

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Lucy Sommerman
Ranch Hand

Joined: Nov 25, 2004
Posts: 61
great thanks. Well, looks like smaller numbers are ok - however, I have already done validation to check is 8 digits (and an integer), so will leave that and justify my choice in the documentation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: leading zeroes, customer reference number
 
Similar Threads
pulzze with Prepare Itinerary
NX: Customer number: numeric, or alpha-numeric ok?
Error passing values to a method - any help!!
WA #1.....word association
How to index the JSP page for different pages