-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRefractoredCustomer.java
More file actions
62 lines (52 loc) · 1.93 KB
/
Copy pathRefractoredCustomer.java
File metadata and controls
62 lines (52 loc) · 1.93 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import java.util.ArrayList;
import java.util.List;
public class Customer {
private String PPS;
private String surname;
private String firstName;
private String DOB;
private String customerID;
private String password;
private List<CustomerAccount> accounts;
public Customer() {
PPS = "";
surname = "";
firstName = "";
DOB = "";
customerID = "";
password = "";
accounts = new ArrayList<>();
}
public Customer(String PPS, String surname, String firstName, String DOB,
String customerID, String password, List<CustomerAccount> accounts) {
this.PPS = PPS;
this.surname = surname;
this.firstName = firstName;
this.DOB = DOB;
this.customerID = customerID;
this.password = password;
this.accounts = accounts;
}
public String getPPS() { return PPS; }
public String getSurname() { return surname; }
public String getFirstName() { return firstName; }
public String getDOB() { return DOB; }
public String getCustomerID() { return customerID; }
public String getPassword() { return password; }
public List<CustomerAccount> getAccounts() {
return accounts;
}
public void setPPS(String PPS) { this.PPS = PPS; }
public void setSurname(String surname) { this.surname = surname; }
public void setFirstName(String firstName) { this.firstName = firstName; }
public void setDOB(String DOB) { this.DOB = DOB; }
public void setCustomerID(String customerID) { this.customerID = customerID; }
public void setPassword(String password) { this.password = password; }
public String toString() {
return "PPS number = " + PPS + "\n"
+ "Surname = " + surname + "\n"
+ "First Name = " + firstName + "\n"
+ "Date of Birth = " + DOB + "\n"
+ "Customer ID = " + customerID;
}
}