public abstract class nhanVien{
public float luongcanban =200000;
set { ngaysinh = value; }
get { return ngaybatdau; }
set { ngaybatdau = value; }
public abstract float luong();
Console.WriteLine("Ma so: ");
Maso = int.Parse(Console.ReadLine());
Console.WriteLine("Ho Ten: ");
Hoten = Console.ReadLine();
Console.WriteLine("Ngày sinh: ");
Ngaysinh = int.Parse(Console.ReadLine());
Console.WriteLine("Địa chỉ: ");
Diachi = Console.ReadLine();
Ngaysinh = int.Parse(Console.ReadLine());
public override string ToString()
"ho ten " + hoten + "ngay sinh" + ngaysinh +"dia chi " + diachi +
"Ngay bat dau " + ngaybatdau + "luong = " + luong() +"\n";
Console.WriteLine(ToString());
public class Manager : nhanVien{
public double hesoluong = 1 ;
public override float luong(){
return (float) (luongcanban * hesoluong) ;
public class Programer : nhanVien{
public double hesoluong = 1.2 ;
public double giolamthem;
Console.WriteLine("Số giờ làm thêm ");
giolamthem = double.Parse(Console.ReadLine());
public double Overtime(){
return (giolamthem * 2100000);
public override float luong(){
return (float) ((luongcanban * hesoluong) + Overtime());
public class Dessigner :nhanVien{
public double thuong = 100000;
public double hesoluong = 1.3 ;
public override float luong(){
return (float) ((luongcanban * hesoluong) + thuong);
}public class Tester :nhanVien{
public double hesoluong = 1.4 ;
Console.WriteLine("Số error tìm được ");
error = Double.Parse(Console.ReadLine());
public override float luong(){
return (float) ((luongcanban * hesoluong) + (error * 200000));
public class quanlynhanvien{
Console.WriteLine("Nhập số nhân viên bạn cần thêm ");
n = int.Parse(Console.ReadLine());
for(int i = 0 ; i < n ; i++ )
Console.WriteLine("Nhập loại nhân viên bạn muốn thêm ");
Console.WriteLine("1.Manager ");
Console.WriteLine("2.Programer ");
Console.WriteLine("2.Programer ");
Console.WriteLine("3.Dessigner ");
Console.WriteLine("4.Tester ");
choose = int.Parse(Console.ReadLine());
case 1: list[i] = new Manager();
case 2: list[i] = new Programer();
case 3: list[i] = new Dessigner();
case 4: list[i] = new Tester();
Console.WriteLine("Đã nhập xong danh sách");
public double tongluong(){
for(int i = 0 ; i< list.Length ; i++){
tongluong += list[i].luong();
for(int i=0; i< list.Length ; i++){
public static void Main()
quanlynhanvien qlnv = new quanlynhanvien();
Console.WriteLine("Tong luong" + qlnv.tongluong());