Untitled

mail@pastecode.io avatar
unknown
java
a year ago
2.0 kB
0
Indexable
Never
import java.util.Date;

public class HoaDon {
    private String ma;
    private String hoTen;
    private Date ngayLap;
    private double tongTien;
    private boolean banSi;
    private boolean traTruoc;
    private String soDienThoai;

    public HoaDon(String ma, String hoTen, double tongTien) {
        this.ma = ma;
        this.hoTen = hoTen;
        this.tongTien = tongTien;
        this.ngayLap = new Date();
        this.banSi = false;
        this.traTruoc = false;
        this.soDienThoai = null;
    }

    public HoaDon(String ma, String hoTen, double tongTien, boolean banSi, boolean traTruoc, String soDienThoai) {
        this.ma = ma;
        this.hoTen = hoTen;
        this.tongTien = tongTien;
        this.ngayLap = new Date();
        this.banSi = banSi;
        this.traTruoc = traTruoc;
        this.soDienThoai = soDienThoai;
    }

    // các getter và setter

    public String getMa() {
        return ma;
    }

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

    public String getHoTen() {
        return hoTen;
    }

    public void setHoTen(String hoTen) {
        this.hoTen = hoTen;
    }

    public Date getNgayLap() {
        return ngayLap;
    }

    public void setNgayLap(Date ngayLap) {
        this.ngayLap = ngayLap;
    }

    public double getTongTien() {
        return tongTien;
    }

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

    public boolean isBanSi() {
        return banSi;
    }

    public void setBanSi(boolean banSi) {
        this.banSi = banSi;
    }

    public boolean isTraTruoc() {
        return traTruoc;
    }

    public void setTraTruoc(boolean traTruoc) {
        this.traTruoc = traTruoc;
    }

    public String getSoDienThoai() {
        return soDienThoai;
    }

    public void setSoDienThoai(String soDienThoai) {
        this.soDienThoai = soDienThoai;
    }
}