-
Notifications
You must be signed in to change notification settings - Fork 2
/
Account.java
68 lines (55 loc) · 1.5 KB
/
Account.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
/*
Account.java
@author Terence Tan Boon Kiat
@guid 2228167t
Account provides a class for user account creation in the system
*/
import java.rmi.RemoteException;
public class Account implements AccountInterface {
private String userID;
private String name;
private String password;
private boolean admin;
protected Account() throws RemoteException {
userID = "";
name = "";
password = "";
admin = false;
}
// Get Login ID
public String getLoginID() throws RemoteException {
return userID;
}
// Get Name
public String getName() throws RemoteException {
return name;
}
// Get Password
public String getPassword() throws RemoteException {
return password;
}
// Get Admin
public boolean getAdmin() throws RemoteException {
return admin;
}
// Set Login ID
public void setLoginID(String login) throws RemoteException {
userID = login;
}
// Set Name
public void setName(String n) throws RemoteException {
name = n;
}
// Set Password
public void setPassword(String pw) throws RemoteException {
password = pw;
}
// Set Admin
public void setAdmin(boolean a) throws RemoteException {
admin = a;
}
// Receive Message from Server
public void receiveMessage(String message) throws RemoteException {
System.out.println(message);
}
}