Repository navigation
Expand file tree
/
Copy pathAdmin.java
More file actions
44 lines (40 loc) · 1.5 KB
/
Copy pathAdmin.java
File metadata and controls
44 lines (40 loc) · 1.5 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
package UserAccounts;
import Comment.*;
import Products.*;
import java.util.ArrayList;
public class Admin extends UserAccount
{
private static Admin admin;
private static ArrayList<Comment> commentRequests = new ArrayList<>();
private static ArrayList<Seller> sellerRequests = new ArrayList<>();
private static ArrayList<EditRequest> editRequests = new ArrayList<>();
private static ArrayList<Product> addRequest = new ArrayList<>();
private static ArrayList<Product> removeRequest = new ArrayList<>();
//--------------------------------
private Admin(String firstName, String lastName, String email, int phoneNumber)
{
super("admin", firstName, lastName, email, phoneNumber, "admin", "admin");
}
//------------------------------
public static Admin getAdmin(String firstName, String lastName, String email, int phoneNumber)
{
if (admin == null)
admin = new Admin(firstName,lastName,email,phoneNumber);
return admin;
}
public static ArrayList<Seller> getWaitingSellers() {
return sellerRequests;
}
public static ArrayList<Product> getAddRequest() {
return addRequest;
}
public static ArrayList<EditRequest> getEditRequest() {
return editRequests;
}
public static ArrayList<Product> getRemoveRequest() {
return removeRequest;
}
public static ArrayList<Comment> getCommentRequests() {
return commentRequests;
}
}