c#语言关于扑克牌的实验
using System; namespace Managertest { class Employee //员工类 { private string name; private decimal salary; public Employee(string name,decimal salary) { this.name=name; this.salary=salary; } public string getName() { return name; } public virtal decimal getalary() { return salary; } public void raise salary(decimal bypercent) { decimal raise=salary*bypercent/100; salary+=raise; } } class Manager:Employee { private decimal bonous; public Manager(string name,decimal salary):base(name,salary) { this.bonous=0.0M; } public void setbonous(decimal b) { this.bonous=b; } public decimal getBonous() { return this.bonous; } public override decimal getSalsry() { decimal baseSalary=base.getSalary(); return baseSalary+this.bonous; } } class Program { static void Main(string[] args) }
暂无评论