-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMember.java
More file actions
65 lines (50 loc) · 1.77 KB
/
Copy pathMember.java
File metadata and controls
65 lines (50 loc) · 1.77 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.*;
public class Member extends Person {
private String memberID;
private String memberType;
protected String[] checkedOut;
// Default Constructor
public Member() {
super();
this.memberID = "0";
this.memberType = "student";
this.checkedOut = new String[5];
Arrays.fill(checkedOut, "0");
}
// Overloaded constructor
public Member(String name, String address, Date dateOfBirth, String email, String socialSecurityNumber, String memberID, String memberType) {
super(name, address, dateOfBirth, email, socialSecurityNumber);
this.memberID = memberID;
this.memberType = memberType;
this.checkedOut = new String[5];
Arrays.fill(checkedOut, "0");
}
public String[] getCheckedOut() {
return this.checkedOut;
}
public String getCheckedOut(int index) {
return this.checkedOut[index];
}
public void setCheckedOut(String[] collectionList) {
this.checkedOut = collectionList;
}
public void setCheckedOut(int index, String collectionID) {
this.checkedOut[index] = collectionID;
}
public String getMemberType() {
return memberType;
}
public void setMemberType(String memberType) {
this.memberType = memberType;
}
// Getter and Setter for memberID
public String getMemberID() {
return memberID;
}
public void setMemberID(String memberID) {
this.memberID = memberID;
}
public String toString() {
return String.format("%s\t%s\t%s\t%s\t%s\t%s\t%s\n", this.getMemberID(), this.getName(), this.getAddress(), this.getDateOfBirth(), this.getEmail(), this.getSocialSecurityNumber(), this.getName(), this.getMemberType());
}
}