using System;
public class PersonAccountPair{
private Person person;
private BankAccount bankAccount;
public PersonAccountPair(Person person, BankAccount bankAccount){
this.person = person;
this.bankAccount = bankAccount;
}
public BankAccount Account {
get {return bankAccount;}
set {bankAccount = value;}
}
public Person Person {
get {return person;}
set {person = value;}
}
} | |
A very simple aggregation of a Person
and his/her BankAccount. In real life
we would program such a Pair generically:
Pair<Person, BankAccount>.
|