File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ import java .io .Serializable ;
2
+ public abstract class User implements Serializable , Changeable {
3
+ protected String username ;
4
+ protected String password ;
5
+ protected String email ;
6
+ boolean verified = false ;
7
+ boolean online = false ;
8
+ public User (String username , String password , String email ){
9
+ this .username = username ;
10
+ this .password = password ;
11
+ this .email = email ;
12
+ }
13
+ public String getEmail (){
14
+ return this .email ;
15
+ }
16
+ public String getUsername (){
17
+ return this .username ;
18
+ }
19
+ public String getPassword (){
20
+ return this .password ;
21
+ }
22
+
23
+ @ Override
24
+ // from Changeable
25
+ public void changeFeature (String feature , String newFeature ){
26
+ if (feature == "Username" ){
27
+ this .username = newFeature ;
28
+ } else if (feature == "Password" ){
29
+ this .password = newFeature ;
30
+ } else if (feature == "Email" ){
31
+ this .email = newFeature ;
32
+ }
33
+ }
34
+
35
+ }
You can’t perform that action at this time.
0 commit comments