文件名称:Polymorphism
-
所属分类:
- 标签属性:
- 上传时间:2015-11-21
-
文件大小:3.48kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
以员工为父类,经理、普工均继承该类,创建经理类和普工类,输出经理和普工的工资。在父类编写getSalary()方法,并在子类中重写,实现多态。(工资包括基本工资与津贴,其中:基本工资:2000+工龄*10,父类定义;津贴与具体岗位有关)-Employees in the parent class, general manager, inherit the class, create a class and general manager, manager of the output and the wages of ordinary workers. GetSalary () method is written in the parent class, and the sub class is rewritten to achieve polymorphism. (salary includes basic salary and allowance, among them: basic salary: 2000+ length of service*10, father kind definition allowance is related to the specific position.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Polymorphism.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.