-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUser.java
172 lines (142 loc) · 3.94 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
package com.company;
/**
* @author samaa, sohaila, noura
*/
/**
* this abstract class user that takes the user info
*/
public abstract class User {
private String userName;
private String address;
private String email;
private String password;
private String nationalId;
private String phoneNumber;
String getUserName;
String getPgetPassword;
/**
* this constructor is a user with specified user name, address, email, password, national id,phone number
*/
public User()
{
userName = "";
address = "";
email = "";
password = "";
nationalId = "";
phoneNumber ="";
}
/**
* this function is to takes user name, address, email, password, national id,phone number and set them
* @param userName is a user name
* @param address is the address of the user
* @param email is the email of the user
* @param password is the password the user want to use to open the system
* @param nationalId is the national id of the user
* @param phoneNumber is the phone number of the user
*/
public User(String userName, String address, String email, String password, String nationalId, String phoneNumber) {
this.userName = userName;
this.address = address;
this.email = email;
this.password = password;
this.nationalId = nationalId;
this.phoneNumber = phoneNumber;
}
/**
* this function is to set user name
* @param userName is the user's name
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* this function is to set the address of the user
* @param address is the user's address
*/
public void setAddress(String address) {
this.address = address;
}
/**
* this function is to set the email of the user
* @param email is user's email
*/
public void setEmail(String email) {
this.email = email;
}
/**
* this function is to set the password
* @param password is user's passward
*/
public void setPassword(String password) {
this.password = password;
}
/**
* this function is to set the national id
* @param nationalId is user's national id
*/
public void setNationalId(String nationalId) {
this.nationalId = nationalId;
}
/**
* this function is to set the phone number
* @param phoneNumber is the user's phone number
*/
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
/**
* this function is to return the user name
* @return user name
*/
public String getUserName() {
return userName;
}
/**
* this function is to get the user's address
* @return address
*/
public String getAddress() {
return address;
}
/**
* this function is to get the user's email
* @return email
*/
public String getEmail() {
return email;
}
/**
* this function is to get the password
* @return password
*/
public String getPassword() {
return password;
}
/**
* this function is to get the user's national id
* @return national id
*/
public String getNationalId() {
return nationalId;
}
/**
* this function is to get the phone number
* @return phone number
*/
public String getPhoneNumber() {
return phoneNumber;
}
public abstract Booking[] viewBooking();
@Override
public String toString() {
return "User{" +
"userName='" + userName + '\'' +
", address='" + address + '\'' +
", email='" + email + '\'' +
", password='" + password + '\'' +
", nationalId='" + nationalId + '\'' +
", phoneNumber='" + phoneNumber + '\'' +
'}';
}
}