vo
Class CreditCardValue

java.lang.Object
  |
  +--vo.CreditCardValue
All Implemented Interfaces:
Serializable

public class CreditCardValue
extends Object
implements Serializable

A customer credit card used for reserving flights and making payments. (This is a value object - the value object design pattern is used to facilitante data transfers between objects and minimize the amount of data transferred.)

Author:
Team Two: Matthew Bass, Vijay Sai, Mannik Bhojwani, Paulo Merson
See Also:
Serialized Form

Field Summary
static int AMEX
           
static int DISC
           
static int MC
           
static int VISA
           
 
Constructor Summary
CreditCardValue()
          Constructor for CreditCardValue.
 
Method Summary
 double getBalance()
          Returns the balance.
 int getExpMonth()
          Returns the expMonth.
 int getExpYear()
          Returns the expYear.
 String getNumber()
          Returns the number.
 int getType()
          Returns the type.
 boolean isValid()
          Performs field level validation of the creditcard * @return boolean - true if the fields have acceptable values, false otherwise
 void setBalance(double balance)
          Sets the balance.
 void setExpMonth(int expMonth)
          Sets the expMonth.
 void setExpYear(int expYear)
          Sets the expYear.
 void setNumber(String number)
          Sets the number.
 void setType(int type)
          Sets the type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AMEX

public static final int AMEX

DISC

public static final int DISC

MC

public static final int MC

VISA

public static final int VISA
Constructor Detail

CreditCardValue

public CreditCardValue()
Constructor for CreditCardValue.
Method Detail

getBalance

public double getBalance()
Returns the balance.
Returns:
double

getExpMonth

public int getExpMonth()
Returns the expMonth.
Returns:
int

getExpYear

public int getExpYear()
Returns the expYear.
Returns:
int

getNumber

public String getNumber()
Returns the number.
Returns:
String

getType

public int getType()
Returns the type.
Returns:
int

setBalance

public void setBalance(double balance)
Sets the balance.
Parameters:
balance - The balance to set

setExpMonth

public void setExpMonth(int expMonth)
Sets the expMonth.
Parameters:
expMonth - The expMonth to set

setExpYear

public void setExpYear(int expYear)
Sets the expYear.
Parameters:
expYear - The expYear to set

setNumber

public void setNumber(String number)
Sets the number.
Parameters:
number - The number to set

setType

public void setType(int type)
Sets the type.
Parameters:
type - The type to set

isValid

public boolean isValid()
Performs field level validation of the creditcard * @return boolean - true if the fields have acceptable values, false otherwise

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003 Team Two.