-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClerk.java
More file actions
36 lines (28 loc) · 932 Bytes
/
Clerk.java
File metadata and controls
36 lines (28 loc) · 932 Bytes
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
package LMS;
public class Clerk extends Staff {
int desk_id; // desk Number of the Clerk
public static int currdesk_id = 1;
public Clerk(int id, String name, String address, int phone, int dob, double salary, int desk_id) // para
// cons.
{
super(id, name, address, phone, dob, salary);
if (desk_id == -1) {
this.desk_id = currdesk_id;
currdesk_id++;
} else
this.desk_id = desk_id;
}
public Clerk() {
super();
}
public void printInfo() { // Method override
super.printInfo();
System.out.println("Desk Number: " + this.desk_id);
}
public int getDesk() {
return this.desk_id;
}
public static int getCurrDesk() {
return currdesk_id;
}
}