-
Notifications
You must be signed in to change notification settings - Fork 0
/
HoiDongBaoVe.java
50 lines (39 loc) · 1.27 KB
/
HoiDongBaoVe.java
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
package com.thanhttt.baitaplon;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
public class HoiDongBaoVe {
private static int dem;
private String maHD;
{
maHD = (String.format("HD%04d", ++dem));
}
private Date ngayLamViec;
private List<BaoCaoKhoaLuan> danhSachKhoaLuan = new ArrayList<>();
public HoiDongBaoVe(){
}
public HoiDongBaoVe(Date ngayLamViec) {
this.ngayLamViec = ngayLamViec;
}
public void hienThi(){
System.out.printf("Ma hoi dong: %s\nNgay lam viec: %s\nDanh sach khoa luan:\n", maHD, CauHinh.f.format(ngayLamViec));
this.getDanhSachKhoaLuan().forEach(k -> System.out.printf(k.getMaBC() + "\n"));
}
public String getMaHD() {
return maHD;
}
public Date getNgayLamViec() {
return ngayLamViec;
}
public void setNgayLamViec(Date ngayLamViec) {
this.ngayLamViec = ngayLamViec;
}
public List<BaoCaoKhoaLuan> getDanhSachKhoaLuan() {
return danhSachKhoaLuan;
}
public void setDanhSachKhoaLuan(List<BaoCaoKhoaLuan> danhSachKhoaLuan) {
this.danhSachKhoaLuan = danhSachKhoaLuan;
}
}