My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.kirkk.cust;

import java.util.*;
import java.math.BigDecimal;
import com.kirkk.bill.*;

public class Customer {
private List bills;

public BigDecimal getDiscountAmount() {
if (bills.size() > 5) {
return new BigDecimal(0.1);
} else {
return new BigDecimal(0.03);
}
}

public List getBills() {
return this.bills;
}

public void createBill(BigDecimal chargeAmount) {
Bill bill = new Bill(this, chargeAmount);
if (bills == null) {
bills = new ArrayList();
}
bills.add(bill);
}

}

Change log

r75 by pragkirk on Nov 18, 2009   Diff
Initial Version
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 551 bytes, 30 lines

File properties

svn:executable
Powered by Google Project Hosting