All pastes #419549 Raw Edit

Miscellany

public java v1 · immutable
·published 2007-04-01 12:40 UTC
rendered paste body
import java.util.List;import java.util.ArrayList;public class Customer extends Person {		Advisor advisor;    List checkingAccountList;    List savingAccountList;		public Customer()	{		this.checkingAccountList = new ArrayList();	}    	public Customer(String firstName, String lastName)  	{    	this.firstName = firstName;        this.lastName = lastName;       	this.checkingAccountList = new ArrayList();       	this.savingAccountList = new ArrayList();    }    public String toString()    {        return "Customer: " + this.firstName + " " + this.lastName + "Advisor: " + this.advisor;            }        public void addCheckingAccount(CheckingAccount ca)    {        this.checkingAccountList.add(ca);	}			public void addSavingAccount(SavingAccount sa)	{		this.savingAccountList.add(sa);	}		//add an Advisor to a customer	public void addAdvisor(Advisor advisor)    {        this.advisor = advisor;    }	}