public class Transaction { //Transaction type public static final int DEBIT = 0; public static final int CREDIT = 1; private Account account; private int amount; private int transactionType; public static String[] types ={"Debit", "Credit"}; //Constructor public Transaction(Account account, int transactionType, int amount){ this.account = account; this.transactionType = transactionType; this.amount = amount; } public Account getAccount(){return account;} public int getTransactionType(){return transactionType;} public int getAmount(){ return amount;} public String toString(){return types[transactionType];} }//end of class Transaction{}