C#继承多态 某公司雇员(Employee)包括经理(Manager),技术人员(Technician)和销售员(Salesman)

上传者: 38268192 | 上传时间: 2019-12-21 20:49:05 | 文件大小: 53KB | 文件类型: zip
某公司雇员(Employee)包括经理(Manager),技术人员(Technician)和销售员(Salesman)。开发部经理(DeveloperManger),既是经理也是技术人员。销售部经理(SalesManager),既是经理也是销售员。 以Employee类为虚基类派生出Manager,Technician和Salesman类;再进一步派生出Developermanager和Salesmanager类。 Employee类的属性包括姓名、职工号、工资级别,月薪(实发基本工资加业绩工资)。操作包括月薪计算函数(pay()),该函数要求输入请假天数,扣去应扣工资后,得出实发基本工资。 Technician类派生的属性有每小时附加酬金和当月工作时数,及研究完成进度系数。业绩工资为三者之积。也包括同名的pay()函数,工资总额为基本工资加业绩工资。 Salesman类派生的属性有当月销售额和酬金提取百分比,业绩工资为两者之积。也包括同名的pay()函数,工资总额为基本工资加业绩工资。 Manager类派生属性有固定奖金额和业绩系数,业绩工资为两者之积。工资总额也为基本工资加业绩工资。 而DeveloperManager类,pay()函数是将作为经理和作为技术人员业绩工资之和的一半作为业绩工资。 SalesManager类,pay()函数则是经理的固定奖金额的一半,加上部门总销售额与提成比例之积,这是业绩工资。 编程实现工资管理。特别注意pay()的定义和调用方法:先用同名覆盖,再用运行时多态。

文件下载

资源详情

[{"title":"( 26 个子文件 53KB ) C#继承多态 某公司雇员(Employee)包括经理(Manager),技术人员(Technician)和销售员(Salesman)","children":[{"title":"class6_4","children":[{"title":"class6_4","children":[{"title":"Technician.cs <span style='color:#111;'> 2.30KB </span>","children":null,"spread":false},{"title":"Employee.cs <span style='color:#111;'> 2.52KB </span>","children":null,"spread":false},{"title":"Salesman.cs <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false},{"title":"class6_4.csproj <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"DeveloperManager.cs <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":true},{"title":"InterfaceManager.cs <span style='color:#111;'> 885B </span>","children":null,"spread":false},{"title":"Manager.cs <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"SalesManager.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"class6_4.csproj.FileListAbsolute.txt <span style='color:#111;'> 496B </span>","children":null,"spread":false},{"title":"class6_4.exe <span style='color:#111;'> 10.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.59KB </span>","children":null,"spread":false},{"title":"class6_4.pdb <span style='color:#111;'> 35.50KB </span>","children":null,"spread":false},{"title":"class6_4.csprojResolveAssemblyReference.cache <span style='color:#111;'> 1.86KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"class6_4.vshost.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"class6_4.exe <span style='color:#111;'> 10.50KB </span>","children":null,"spread":false},{"title":"class6_4.pdb <span style='color:#111;'> 35.50KB </span>","children":null,"spread":false},{"title":"class6_4.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"class6_4.vshost.exe <span style='color:#111;'> 22.16KB </span>","children":null,"spread":false}],"spread":false},{"title":"Release","children":null,"spread":false}],"spread":false}],"spread":false},{"title":".vs","children":[{"title":"class6_4","children":[{"title":"v14","children":[{"title":".suo <span style='color:#111;'> 42.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"class6_4.sln <span style='color:#111;'> 991B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明