{
public string name;
public long idcard;
public double salary;
public double increase;
public Employeee(string n, long i, double m)
{
name = n;
idcard = i;
salary = m;
}
public void Print()
{
Console.WriteLine("姓名:{0}", name);
Console.WriteLine("身份证号:{0}", idcard);
Console.WriteLine("基本工资:{0}", salary);
Console.WriteLine("增加工资额:{0}", increase);
}
public virtual void Raise(double percent)
{
increase = percent * salary;
}
}
public class WorkEmp : Employeee
{
public WorkEmp(string i, long j, double k) : base(i, j, k) { }
public override void Raise(double percent)
{
Console.WriteLine("\n 普通员工工资增加数额计算:");
base.increase = base.salary * percent;
}
}
public class BachelorEmp : Employeee
{
public BachelorEmp(string i, long j, double k) : base(i, j, k) { }
public override void Raise(double percent)
{
评论1
最新资源