-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.java
58 lines (56 loc) · 1.41 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
import javax.swing.*;
import java.io.*;
import java.util.*;
public abstract class User {
public ArrayList<Book> books = new ArrayList<Book>();
public ArrayList<Book> record = new ArrayList<Book>();
protected String name;
protected static String email;
protected String password;
protected String iden;
protected int count;
//constructor
public User(String name, String password, String email){
setName(name);
setPassword(password);
setEmail(email);
}
//service methods
public String getName() {
return name;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
if(password.length() <= 3){
JOptionPane.showMessageDialog(null, "½Ð¿é¤J¶W¹L3Ó¦r¤¸!!!");
}
else{
this.password = password;
}
}
public static String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getIden() {
return iden;
}
public void setIden(String iden) {
this.iden = iden;
}
//functional methods
public abstract void gui()throws IOException;
}