-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAccount.java
More file actions
47 lines (37 loc) · 1.12 KB
/
Account.java
File metadata and controls
47 lines (37 loc) · 1.12 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package io.zipcoder;
public abstract class Account {
private Object accountHolder;
private Double balance;
private String accountNumber;
// TODO: Add a field to track transactions
public Account(Object accountHolder, Double balance, String accountNumber) {
// TODO: Implement constructor
}
public Object getAccountHolder() {
// TODO: Implement getter
return null;
}
public Double getBalance() {
// TODO: Implement getter
return null;
}
public void setBalance(Double balance) {
// TODO: Implement setter
}
public String getAccountNumber() {
// TODO: Implement getter
return null;
}
public void credit(Double amount) {
// TODO: Implement credit method (add money to account)
// TODO: Record this transaction
}
public void debit(Double amount) {
// TODO: Implement debit method (remove money from account)
// TODO: Record this transaction
}
public Object getTransactions() {
// TODO: Implement method to return transaction history
return null;
}
}