|
@@ -1,10 +1,77 @@
|
|
1
|
+import java.time.LocalDate;
|
1
|
2
|
import java.util.ArrayList;
|
|
3
|
+import java.util.Iterator;
|
2
|
4
|
|
3
|
5
|
public class Checkbook {
|
4
|
6
|
private ArrayList<Transaction> transactionList;
|
|
7
|
+ private double cashAmount;
|
|
8
|
+ private Payee owner;
|
5
|
9
|
|
6
|
|
- Checkbook(ArrayList<Transaction> transactionList){
|
7
|
|
- this.transactionList = transactionList;
|
|
10
|
+ Checkbook(double cashAmount){
|
|
11
|
+ this.cashAmount = cashAmount;
|
|
12
|
+ this.transactionList = new ArrayList<>();
|
8
|
13
|
}
|
|
14
|
+ Checkbook(Payee owner, double cashAmount){
|
|
15
|
+ this.owner = owner;
|
|
16
|
+ this.cashAmount = cashAmount;
|
|
17
|
+ this.transactionList = new ArrayList<>();
|
|
18
|
+ }
|
|
19
|
+
|
|
20
|
+ public int size(){
|
|
21
|
+ return -1;
|
|
22
|
+ }
|
|
23
|
+
|
|
24
|
+ public boolean isEmpty(){
|
|
25
|
+ return false;
|
|
26
|
+ }
|
|
27
|
+
|
|
28
|
+ public boolean contains(Transaction element){
|
|
29
|
+ return false;
|
|
30
|
+ }
|
|
31
|
+
|
|
32
|
+ public boolean add(Transaction element){
|
|
33
|
+ return false;
|
|
34
|
+ }
|
|
35
|
+
|
|
36
|
+ public boolean remove(Transaction element){
|
|
37
|
+ return false;
|
|
38
|
+ }
|
|
39
|
+
|
|
40
|
+ public Iterator<Transaction> iterator(){
|
|
41
|
+ return null;
|
|
42
|
+ }
|
|
43
|
+
|
|
44
|
+ public Transaction[] toArray(){
|
|
45
|
+ return null;
|
|
46
|
+ }
|
|
47
|
+
|
|
48
|
+ public Transaction[] toArray(Transaction[] a){
|
|
49
|
+ return null;
|
|
50
|
+ }
|
|
51
|
+
|
|
52
|
+ public double checkbookValue(){
|
|
53
|
+ return -1;
|
|
54
|
+
|
|
55
|
+ } // sum of all Transactions (both Debits and Credits)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+ public Transaction getTransactionsForDate(LocalDate aDate){
|
|
59
|
+ return null;
|
|
60
|
+ }
|
|
61
|
+
|
|
62
|
+ public Transaction[] getAllTransactionsForPayee(Payee payee){
|
|
63
|
+ return null;
|
|
64
|
+ }
|
|
65
|
+
|
|
66
|
+ public Transaction[] getAllDebitTransactions(){
|
|
67
|
+ return null;
|
|
68
|
+ }
|
|
69
|
+
|
|
70
|
+ public Transaction[] getAllCreditTransactions(){
|
|
71
|
+ return null;
|
|
72
|
+ }
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
9
|
76
|
|
10
|
77
|
}
|