-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNhanVien.java
More file actions
63 lines (44 loc) · 1.41 KB
/
NhanVien.java
File metadata and controls
63 lines (44 loc) · 1.41 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
54
55
56
57
58
59
60
61
62
63
package thanh.Model;
import java.util.ArrayList;
/**
* Created by hamhochoi on 24/10/2016.
*/
public class NhanVien {
private String ten;
private double heSoLuong;
private final double LUONG_CO_BAN = 3000000;
public NhanVien(){
this.ten = null;
this.heSoLuong = 0;
}
public NhanVien(String ten, double heSoLuong){
this.ten = ten;
this.heSoLuong = heSoLuong;
}
ArrayList<NhanVien> nhanVien = new ArrayList<NhanVien>();
public ArrayList<NhanVien> add(){
nhanVien.add(new NhanVien("Nguyen Van A", 1.5));
nhanVien.add(new NhanVien("Nguyen Van B", 2.5));
nhanVien.add(new NhanVien("Nguyen Van C", 3.5));
nhanVien.add(new NhanVien("Nguyen Van D", 1.5));
nhanVien.add(new NhanVien("Nguyen Van E", 2.5));
nhanVien.add(new NhanVien("Nguyen Van F", 1.5));
nhanVien.add(new NhanVien("Nguyen Van G", 3.5));
return nhanVien;
}
public double getHeSoLuong() {
return heSoLuong;
}
public double getLuongCoBan() {
return LUONG_CO_BAN;
}
public String getTen() {
return ten;
}
public void setHeSoLuong(double heSoLuong) {
this.heSoLuong = heSoLuong;
}
public void setTen(String ten) {
this.ten = ten;
}
}