-
HardWork
说明: 上转型对象
1.实验目的
掌握上转型对象的使用。
2. 实验要求
要求有一个abstract类,类名为Employee,Employee的子类有YearWorker、MonthWorker和WeekWorker。YearWorker对象按年领取薪水,MonthWorker按月领取薪水,WeekWorker按周领取薪水。Employee有一个abstract方法:
public abstract earnings()
子类必须重写父类的earnings()方法,给出各自领取薪水的具体方式。
有一个Company类,该类用Employee数组作为成员,Employee数组的单元可以是YearWorker对象、MonthWorker对象或WeekWorker对象的上转型对象。程序能输出Company对象一年需支付的薪水总额。
(The transformation of the object 1. Purpose of the experiment used to grasp the transformation of the object. 2. Experiment requires a abstract class requirements, class named Employee, Employee of the child class has YearWorker, MonthWorker and WeekWorker. YearWorker object to receive annual salary, MonthWorker receive a monthly salary, WeekWorker receive weekly salary. Employee one abstract method: public abstract earnings () sub-class must override the parent class of earnings () method, given their own specific way of receiving pay. A Company class, such as members with an array of Employee, Employee of the array elements can be YearWorker object, MonthWorker object or objects on the transformation of objects WeekWorker. Company object program can output a year' s salary to be paid the total amount.)
- 2010-04-27 18:54:17下载
- 积分:1
-
paper2
Novel fast motion estimation algorithm based on optimizing predictive motion vector
- 2011-12-04 15:43:48下载
- 积分:1
-
validity
一种层次聚类的方法,用matlab实现的源代码,可对点数据等进行聚类分析(A hierarchical clustering method, using matlab to achieve the source code, can be carried to the point of data clustering analysis)
- 2013-11-03 20:49:00下载
- 积分:1
-
random-demodulator
压缩采样仿真实验代码,基于随机解调器,仿真功能完善(Compressive sampling simulation code, based on random demodulator perfect simulation function)
- 2020-12-09 06:29:19下载
- 积分:1
-
PV_buck_MPPT
说明: 使用buck变换器实现最大功率点跟踪MPPT,给电池充电。(Use the buck converter to realize the maximum power point tracking MPPT and charge the battery.)
- 2021-02-07 19:33:44下载
- 积分:1
-
airline-t
using matlab, for prediction systems
- 2013-08-31 19:31:44下载
- 积分:1
-
cholesky
典型的cholesky 分解算法,希望对大家有所帮助啊(typical cholesky deposition )
- 2011-12-16 19:12:08下载
- 积分:1
-
hlvdeng
一种主干道、支道交通模型的图形仿真,模仿了各个车辆的真实行驶状况(A main road, the the branch road traffic model graphics simulation mimic real driving conditions for each vehicle)
- 2012-12-03 21:41:33下载
- 积分:1
-
quadrado
Cancelamento de ruido acustico
- 2010-12-02 07:32:54下载
- 积分:1
-
PID
MATLAB PID控制程序包,里面有较强的功能实现。(MATLAB PID control package, which has strong functions.)
- 2008-07-25 09:23:47下载
- 积分:1