-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecurity.java
More file actions
46 lines (40 loc) · 1.28 KB
/
Security.java
File metadata and controls
46 lines (40 loc) · 1.28 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
package qldv;
import java.util.Scanner;
public class Security extends Person {
private String area;
public static int sttBV=0;
Security(String name, int age, String gender, String add, String phoneNum, String homeTown, String code, int coSalary, int dayofWork,String area, String setial){
super(name, age, gender, add, phoneNum,homeTown, code, coSalary, dayofWork, setial);
this.area = area;
// this.setial = setial;
sttBV++;
setial= String.format("BV%03d",sttBV);
}
Security(){
sttBV++;
setial= String.format("BV%03d",sttBV);
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
@Override
public void Information(){
System.out.println("Nhập thông tin bảo vệ: ");
Scanner sc = new Scanner(System.in);
super.Information();
System.out.print("Khu vực bảo vệ: ");
area = sc.nextLine();
}
public void showInformation(){
super.showInformation();
System.out.println("Khu vực bảo vệ: "+ this.area);
}
public void Run(){
Information();
showInformation();
Salary();
}
}