package core;
import java.util.Date;
public class SinhVien extends ThanhVien {
private double diemTrungBinh;
public SinhVien() {
}
public SinhVien(double diemTrungBinh, String maThanhVien, String ten, Date ngaySinh, String namHoc) {
super(maThanhVien, ten, ngaySinh, namHoc);
this.diemTrungBinh = diemTrungBinh;
}
public double getDiemTrungBinh() {
return diemTrungBinh;
}
public void setDiemTrungBinh(double diemTrungBinh) {
this.diemTrungBinh = diemTrungBinh;
}
@Override
public double tinhThuong() {
if (diemTrungBinh >= 9) {
return 2400000;
} else if (diemTrungBinh >= 8) {
return 1200000;
} else {
return 0;
}
}
}
package core;
import java.util.Date;
public class GiangVien extends ThanhVien{
private int soBaiBao, soDeTai;
public GiangVien() {
}
public GiangVien(int soBaiBao, int soDeTai, String maThanhVien, String ten, Date ngaySinh, String namHoc) {
super(maThanhVien, ten, ngaySinh, namHoc);
this.soBaiBao = soBaiBao;
this.soDeTai = soDeTai;
}
public void setSoBaiBao(int soBaiBao) {
this.soBaiBao = soBaiBao;
}
public int getSoBaiBao() {
return soBaiBao;
}
public void setSoDeTai(int soDeTai) {
this.soDeTai = soDeTai;
}
public int getSoDeTai() {
return soDeTai;
}
@Override
public double tinhThuong() {
return soBaiBao*1000000+soDeTai*1500000;
}
}
» Tin mới nhất:
» Các tin khác: