This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

customer id = exactly 8 digits?

 
Andy Jung
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Roel De Nijs
Sheriff
Posts: 9117
75
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:(I believe Roberto implemented it that way)


Exactly!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic