aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes customer id = exactly 8 digits? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "customer id = exactly 8 digits?" Watch "customer id = exactly 8 digits?" New topic
Author

customer id = exactly 8 digits?

Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150
Hi,

my assignment (URLyBird 1.1.2) says that the customer id is "an 8 digit number".
Does this imply that only ids with exactly 8 digits should be accepted as valid ids?

In my current implementation a valid customer id consists of at least one up to a maximum of 8 digits.

regards,
Andy


SCJP, SCJD
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4908
    
  10

I think that's just your decision. In my application customer id must be exactly 8, otherwise a message is shown. That's why I stored it in a String and not an Integer But less than 8 digits will be fine too (I believe Roberto implemented it that way)


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2246

Roel De Nijs wrote:(I believe Roberto implemented it that way)


Exactly!


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: customer id = exactly 8 digits?
 
Similar Threads
B&S: Customer ID
id value in B&S 2.3.1
leading zeroes, customer reference number
Loosing Object-Oriented Design points - URLyBird
NX: Customer number: numeric, or alpha-numeric ok?