-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.java
More file actions
35 lines (28 loc) · 871 Bytes
/
Customer.java
File metadata and controls
35 lines (28 loc) · 871 Bytes
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
import java.util.ArrayList;
import java.util.List;
public class Customer extends User {
private Bank bank;
private List<Transaction> transactions;
public Customer(String username, String password, Bank bank) {
super(username, password);
this.bank = bank;
this.transactions = new ArrayList<>();
}
public void deposit() {
// Logic for deposit
System.out.println("Depositing money.");
}
public void withdraw() {
// Logic for withdraw
System.out.println("Withdrawing money.");
}
public void transfer() {
// Logic for transfer
System.out.println("Transferring money.");
}
public void viewTransactions() {
// Logic to view transactions
System.out.println("Viewing transactions.");
}
// Implement other customer-specific methods
}