1 |
package com.instantiations.example.account; |
2 |
|
3 |
import com.instantiations.example.customer.*; |
4 |
import com.instantiations.example.money.*; |
5 |
|
6 |
/** |
7 |
* The class <code>Account</code> exists primarily to create a cyclic dependency |
8 |
* between the <code>account</code> and <code>customer</code> projects. |
9 |
* @author Albert Adams |
10 |
*/ |
11 |
public class Account |
12 |
{ |
13 |
private Customer owner; |
14 |
|
15 |
private Money balance; |
16 |
|
17 |
public Account(Customer owner) |
18 |
{ |
19 |
this.owner = owner; |
20 |
balance = new Money(0, "USD"); |
21 |
} |
22 |
|
23 |
public Customer getOwner() |
24 |
{ |
25 |
return owner; |
26 |
} |
27 |
|
28 |
public Money getBalance() |
29 |
{ |
30 |
return balance; |
31 |
} |
32 |
} |