Class Payment

java.lang.Object
  extended by Payment

public class Payment
extends java.lang.Object

Class representing a payment on an account.


Constructor Summary
Payment(java.lang.String account, double amount)
          Create a new Payment object.
 
Method Summary
 java.lang.String getAccount()
          Retrieve account ID
 double getAmount()
          Retrieve payment amount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Payment

public Payment(java.lang.String account,
               double amount)
Create a new Payment object.

Precondition: account is two letters followed by four digits.

Precondition: amount > 0.

Parameters:
account - Account ID. Two letters followed by four digits.
amount - Payment amount. Must be greater than zero.
Method Detail

getAccount

public java.lang.String getAccount()
Retrieve account ID

Returns:
Account ID as a String

getAmount

public double getAmount()
Retrieve payment amount

Returns:
Payment amount as a double