-
Notifications
You must be signed in to change notification settings - Fork 0
/
SystemUser.java
105 lines (74 loc) · 3.58 KB
/
SystemUser.java
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package jobfindersys;
import java.util.Scanner;
public abstract class SystemUser {
public static CompanyAdmin c_admins[]= new CompanyAdmin[3];
public JobPoster JobPostersOfDELL[]= new JobPoster[3];
public JobPoster JobPostersOfLENOVO[]= new JobPoster[3];
public JobPoster JobPostersOfSAMSUNG[]= new JobPoster[3];
static boolean Login(CompanyAdmin c_admins, String mail, String pass) {
// for (int i =0; i<c_admins.length; i++){
if(c_admins.UserEmail.equals(mail)){
if(c_admins.UserPassword.equals(pass)){
System.out.println("\n*******************\n -Logged In Successfully:\n \n account details:\n\n -Email:" +"\t"+c_admins.UserEmail+"\n Member Type: "+c_admins.UserType+"\n Password: *********");
return true;
}
}
else{
System.out.println("\n Not correct email or password");
return false;
}
// }
return false;
}
static boolean Login(JobPoster jp, String mail, String pass) {
if(jp.UserEmail.equals(mail)){
if(jp.UserPassword.equals(pass)){
System.out.println("\n Logged In Successfully:\n \n -account details:\n Email:" +"\t"+jp.UserEmail+"\n \n Member Type: "+jp.UserType+"\n \n Password: *********");
System.out.println("");
return true;
}
}
else{
System.out.println("Invalid email or password");
return false;
}
return false;
}
/*
if ((mail.equals(c_admins[0].UserEmail)) || (mail.equals(c_admins[1].UserEmail)) || (mail.equals(c_admins[2].UserEmail))) {
System.out.println("Welcome admin");
//Calling Functions of admin
}
else if (mail.equals(P1[0].UserEmail) || mail.equals(P1[1].UserEmail) || mail.equals(P1[2].UserEmail)) {
System.out.println("Welcome dell poster");
//Calling Functions of dell poster
/*
}
else if (mail.equals(P2[0].UserEmail) || mail.equals(P2[1].UserEmail) || mail.equals(P2[2].UserEmail)) {
System.out.println("Welcome lenovo poster");
//Calling Functions of dell poster
}
else if (mail.equals(P3[0].UserEmail) || mail.equals(P2[1].UserEmail) || mail.equals(P2[2].UserEmail)) {
System.out.println("Welcome Samsung poster");
//Calling Functions of dell poster
}
else {
System.out.println(" INVALID ENTRY");
}
*/
public String UserName;
public String UserEmail;
public String UserPassword;
public String UserType; //in case needed
public SystemUser(String user_name, String user_email, String user_password,
String user_type)
{
this.UserName= user_name;
this.UserEmail= user_email;
this.UserPassword= user_password;
this.UserType= user_type;
}
public void UserInfo_Validation() {
}
// abstract float Newfeature();
}