-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.java
More file actions
60 lines (48 loc) · 1.64 KB
/
Customer.java
File metadata and controls
60 lines (48 loc) · 1.64 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
/* FINAL PROJECT - CHI, EUGENIE, MADISON - DEC 20, 2021
This class builds an individual customer based on the structure of a node.
Each customer has their own name, credit card number, email, movie wishlist and "have watched" movie list.
*/
public class Customer implements java.io.Serializable{
private String name;
private int creditNum;
private String email;
private WishList individualList= new WishList();
private Customer nextCustomer;
private WatchedMovies haveWatched = new WatchedMovies();
public Customer(String name, int creditNum, String email) {
this.name = name;
this.creditNum = creditNum;
this.email = email;
}
public String getCustomerName() {
return name;
}
public int getCreditNum() {
return creditNum;
}
public String getCustomerEmail() {
return email;
}
public Customer getNextCustomer() {
return nextCustomer;
}
// This method returns the haveWatched movie list of each customer
public WatchedMovies getWatched() {
return haveWatched;
}
// This method returns the movie WishList of each customer
public WishList getWishList() {
return individualList;
}
// This method allows for changing a customer's name (customer menu option 5)
public void setCustomerName(String name) {
this.name = name;
}
// This method allows for changing a customer's name (customer menu option 5)
public void setCustomerEmail(String email) {
this.email = email;
}
public void setNextCustomer(Customer nextCustomer) {
this.nextCustomer = nextCustomer;
}
}