-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFaculty.java
More file actions
53 lines (47 loc) · 1.29 KB
/
Faculty.java
File metadata and controls
53 lines (47 loc) · 1.29 KB
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
import java.io.Serializable;
public class Faculty extends Person implements Serializable{
private static final long serialVersionUID = 1L;
public Faculty(String fName, String lName, Integer id, Integer phone,
String home) {
super(fName, lName, id, phone, home);
}
public Faculty(String lName) {super(lName);}
// Data field
private String officeAdd;
private String title;
private String department;
private Integer payScale;
// Getters and Setters
public String getOfficeAdd() {
return officeAdd;
}
public void setOfficeAdd(String officeAdd) {
this.officeAdd = officeAdd;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public int getPayScale() {
return payScale;
}
public void setPayScale(int payScale) {
// Must be between 1 and 12
if (payScale>0 && payScale<13)
this.payScale = payScale;
}
@Override
public String toString() {
String temp = super.toString();
return "Faculty [" +temp.substring(8, temp.length()-1) +", " +"office=" + officeAdd + ", title=" + title
+ ", department=" + department + ", payScale=" + payScale + "]";
}
}