-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdmin.java
95 lines (81 loc) · 1.59 KB
/
Admin.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
package com.company;
import java.util.HashMap;
class Admin extends User {
/**
* <p>
* This is a subclass class of user.java and this will be used as a
* simple constructor for the admins of this program
*<br>
* @param ausername, apassword
* @return -
* @see -
* @author
*/
public Admin (String ausername, String apassword)
{
this.username=ausername;
this.password=apassword;
this.role='a';
this.seeUsers=true;
this.seeReserves=true;
this.accepts=true;
this.sendMessages=true;
this.seeHotels=false;
this.seeMessages=false;
this.hasHotel=false;
this.canReserve=false;
}
/**
* <p>
* returns the role as string
*<br>
* @param -
* @return admin
* @see -
* @author
*/
public String getRole()
{
return "admin";
}
/**
* <p>
* returns the password as string
*<br>
* @param -
* @return this.password
* @see -
* @author
*/
public String getPassword()
{
return this.password;
}
/**
* <p>
* returns the username as string
*<br>
* @param -
* @return this.username
* @see -
* @author
*/
public String getUsername()
{
return this.username;
}
/**
* <p>
* This is a char function that returns
* the role of every user
*<br>
* @param -
* @return role
* @see -
* @author
*/
public char role()
{
return this.role;
}
}