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

sosc::AmericanExpress Class Reference

Inheritance diagram for sosc::AmericanExpress:

sosc::CreditCard sosc::Validatable List of all members.

Public Methods

 AmericanExpress (final String americanexpress)
boolean equals (final Object o)

Static Public Methods

boolean validate (String num)

Protected Methods

boolean checkSize ()
boolean checkPrefix ()

Detailed Description

The AmericanExpress class contains methods for comparing and validating AmericanExpress numbers.

Author:
Brad Johnson, Set E, ID# A00253700

Definition at line 9 of file AmericanExpress.java.


Constructor & Destructor Documentation

sosc::AmericanExpress::AmericanExpress final String    americanexpress [inline]
 

The constructor for American Express calls the cunstructor from Validatable in order to set the number and type field values.

Parameters:
americanexpress  the number to be validated, in String form
Returns:
none

Definition at line 18 of file AmericanExpress.java.

Referenced by sosc::AmericanExpress::validate().


Member Function Documentation

boolean sosc::AmericanExpress::checkPrefix   [inline, protected]
 

checkPrefix() tests the prefix of the number being validated to see if it is correct for the related type.

Parameters:
none 
Returns:
the boolean result of the validation

Reimplemented from sosc::Validatable.

Definition at line 58 of file AmericanExpress.java.

References sosc::Validatable::number.

boolean sosc::AmericanExpress::checkSize   [inline, protected, virtual]
 

checkSize() is used to check that the number being validated has the correct number of digits for its type.

Returns:
true or false is returned based on the result of the size check

Implements sosc::Validatable.

Definition at line 46 of file AmericanExpress.java.

References sosc::Validatable::number.

boolean sosc::AmericanExpress::equals final Object    o [inline]
 

The equals method checks to see if the object passed in is an instance of this class. If it is an instance, the equals method from the Validatable class is called.

Parameters:
o  the object to be compared against
Returns:
the result of the comparison

Definition at line 31 of file AmericanExpress.java.

boolean sosc::AmericanExpress::validate String    num [inline, static]
 

The static validate method creates a new object and calls the instance validate() method.

Parameters:
num  the number to be validated in String form
Returns:
the result of the validation

Definition at line 72 of file AmericanExpress.java.

References sosc::AmericanExpress::AmericanExpress().


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