Untitled

mail@pastecode.io avatar
unknown
java
a year ago
968 B
0
Indexable
Never
import java.text.SimpleDateFormat;
import java.util.Date;

public class HoaDon {
    private String ma;
    private String hoTenKH;
    private double tongTien;

    public HoaDon(String ma, String hoTenKH, double tongTien) {
        this.ma = ma;
        this.hoTenKH = hoTenKH;
        this.tongTien = tongTien;
    }

    public String getMa() {
        return ma;
    }

    public void setMa(String ma) {
        this.ma = ma;
    }

    public String getHoTenKH() {
        return hoTenKH;
    }

    public void setHoTenKH(String hoTenKH) {
        this.hoTenKH = hoTenKH;
    }

    public double getTongTien() {
        return tongTien;
    }

    public void setTongTien(double tongTien) {
        this.tongTien = tongTien;
    }

    public String getNgayLap() {
        SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
        Date date = new Date();
        return formatter.format(date);
    }
}