Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sosc::CreditCard Class Reference

Inheritance diagram for sosc::CreditCard:

sosc::Validatable sosc::AmericanExpress sosc::MasterCard sosc::Visa List of all members.

Protected Methods

 CreditCard (final String num, final String typ)
boolean checkDigits (final int[] digits)

Detailed Description

The CreditCard class is used mainly to provied the checkDigits() method which is common to all credit card objects.

Definition at line 7 of file CreditCard.java.


Constructor & Destructor Documentation

sosc::CreditCard::CreditCard final String    num,
final String    typ
[inline, protected]
 

The constructor for the credit card class sets the values for number and type by making a call to the constructor from the Validatable class.

Parameters:
num  the number related to the Validatable object
typ  the type related to the Validatable object
Returns:
none

Definition at line 17 of file CreditCard.java.


Member Function Documentation

boolean sosc::CreditCard::checkDigits final int    digits[] [inline, protected]
 

checkDigits() performs the actual validation algorithm. For a an english version of the algorithm go to the following link: http://www.cs.queensu.ca/home/bradbury/checkdigit/

Parameters:
digits  [] an array of the digits in the number to be validated
Returns:
the result of the validation

Definition at line 29 of file CreditCard.java.

References sosc::Validatable::number.


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 17:19:21 2003 for SOSC by doxygen1.2.15