-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.java
52 lines (42 loc) · 1.12 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
import java.io.*;
import java.util.*;
//User.java
//Abstract User class
public abstract class User implements Serializable {
//Instance variables
protected String lName;
protected String fName;
protected String type;
//End Instance Variables
//Class Methods
public void setName(String lastName, String firstName) {
this.lName = lastName;
this.fName = firstName;
} //end set name
public void setLName(String newLName) {
this.lName = newLName;
}//end setLName
public void setFName(String newFName) {
this.fName = newFName;
}//end setFName
public String getFirstName() {
return this.fName;
} // end getFirstName
public String getLastName() {
return this.lName;
} // end getLastName
public String getFullName() {
String fullName = "";
fullName += getLastName();
fullName += ", ";
fullName += getFirstName();
return fullName;
} // end getFullName
public void setType(String typeUser) {
this.type = typeUser;
} //end setType
public String getType() {
return this.type;
} // end getType
//End Class Methods
} // end User