August 2004
Intermediate to advanced
480 pages
9h 41m
English
This little program validates credit card numbers according to their structure. That is, it does not tell you anything regarding the account associated with the credit card number passed to it. All it does is tell you that the argument passed could be a real credit card number. It does this using the Luhn formula. This app is easily incorporated into any e-commerce application you might have in place, and works well as a front-line validation before incurring the overhead required to check the account and process the transaction.
Converting Strings, ternary operator, validating input, designing the methods of a class, JavaDoc, using the Character class, for loops, arrays.
package net.javagarage.misc; /** <p> ...
Read now
Unlock full access