-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFaculty.java
More file actions
37 lines (34 loc) · 1.38 KB
/
Faculty.java
File metadata and controls
37 lines (34 loc) · 1.38 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
package module2.oop.inheritance;
/**
* Faculty
*/
public class Faculty extends Employee {
private String officeHours;
private String rank;
/**
* Construct a new Faculty member
* @param name The person's name (ex: "Nick Coolkid")
* @param address The person's address (ex: "420 Wicked Lane")
* @param phoneNumber The person's phone number (ex: "123-456-7890")
* @param emailAddress The person's email address (ex: "coolkid69@email.com")
* @param office The location of the employee's office
* @param salary The employee's yearly salary (ex: "$9999")
* @param dateHired The date the employee was hired (ex: new MyDate(2000, 01, 01))
* @param officeHours The times when the faculty is available (ex: "MWF 9am - 12pm")
* @param rank The faculty member's rank (ex: "teacher")
*/
public Faculty(String name, String address, String phone, String email,
String office, String salary, MyDate dateHired,
String officeHours, String rank) {
super(name, address, phone, email, office, salary, dateHired);
this.officeHours = officeHours;
this.rank = rank;
}
public String toString() {
return (
super.toString() + "\n"
+ "🕒 Office Hours: " + officeHours + "\n"
+ "📎 Rank: " + rank
);
}
}