Package bank

Class Account

java.lang.Object
bank.Account
All Implemented Interfaces:
Serializable, Comparable<Account>

public class Account extends Object implements Comparable<Account>, Serializable
This class represents the relationship between a bank and its customers (account holders). An account belongs to one or more holders. Each account has one current account and 0 (zero) or more savings accounts.
See Also:
Serialized Form
  • Constructor Details

    • Account

      public Account(int id, double amount)
      Parameters:
      id - account id
      amount - initial amount for the current account.
  • Method Details