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

sosc::Visa Class Reference

Inheritance diagram for sosc::Visa:

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

Public Methods

 Visa (final String visa)
boolean equals (final Object o)

Static Public Methods

boolean validate (String num)

Protected Methods

boolean checkSize ()
boolean checkPrefix ()

Detailed Description

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

Author:
Brad Johnson, Set E, ID# A00253700

Definition at line 9 of file Visa.java.


Constructor & Destructor Documentation

sosc::Visa::Visa final String    visa [inline]
 

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

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

Definition at line 18 of file Visa.java.

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


Member Function Documentation

boolean sosc::Visa::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 Visa.java.

References sosc::Validatable::number.

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

checkSize() is used to check that the number being validated has the correct number 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 Visa.java.

References sosc::Validatable::number.

boolean sosc::Visa::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 Visa.java.

boolean sosc::Visa::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 Visa.java.

References sosc::Visa::Visa().


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