-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.java
100 lines (90 loc) · 1.88 KB
/
User.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
/**
* Write a description of class User here.
*
* @author (Pan Qi)
* @version (a version number or a date)
*/
public class User
{
private String userName;
private String userId;
private String email;
private String password;
/**
* A defualt constructor for objects of class User
*/
public User()
{
userName = "";
userId = "";
email = "";
password = "";
}
/**
* A constructor for objects of class User.
* Passing parameter name, id, newEmail, newPassword.
*/
public User(String name,String id,String newEmail,String newPassword)
{
userName = name;
userId = id;
email = newEmail;
password = newPassword;
}
/**
* Create a getEmail method to get the user email.
*/
public String getEmail()
{
return email;
}
/**
* Create a getId method to get the user's id.
*/
public String getId()
{
return userId;
}
/**
* Create a getName method to get the user name.
*/
public String getName()
{
return userName;
}
/**
* Create a getPassword method to get the user's password
*/
public String getPassword()
{
return password;
}
/**
* Create a setEmail method to set the user email.
*/
public void setEmail(String newEmail)
{
email = newEmail;
}
/**
* Create a setId method to set user's id.
*/
public void setId(String id)
{
userId = id;
}
/**
* Create a setName method to set the user name.
*/
public void setName(String name)
{
userName = name;
}
/**
* Create a setPassword method to set the user's password.
*/
public void setPassword(String newPassword)
{
password = newPassword;
}
}