-
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
-
gudaopanduan
对解列的一个网络,判断出其子系统的个数及每个子系统的节点及其支路(For splitting a network, determine the number of its subsystems and each subsystem node and branch)
- 2013-07-15 15:55:58下载
- 积分:1
-
inverse21
inverse dynamic of robot.nt to upload source code, you can
- 2013-07-28 17:24:36下载
- 积分:1
-
lyapunov
用来计算Lyapunov图的源程序,只需要改变微分方程即可直接引用(Used to calculate the Lyapunov map source, only need to change the differential equations can be directly referenced)
- 2013-03-06 21:08:57下载
- 积分:1
-
MATLAB_for_Fuzzy
模糊神经网络解耦的MATLAB程序,适用于神经网络学习者(MATLAB fuzzy neural network decoupling procedures applicable to the neural network learners)
- 2013-03-21 09:46:11下载
- 积分:1
-
CMAC-PID
CAMC与PID并行控制的仿真.采用SIMULINK仿真实现CAMC和PID的并行控制(CAMC in parallel with the PID control simulation. SIMULINK Simulation using parallel CAMC and PID control)
- 2009-11-06 09:59:51下载
- 积分:1
-
moravec
moravec角点检测的matlab实现(moravec corner detection matlab implementation)
- 2009-12-25 17:24:20下载
- 积分:1
-
lobpcg
Conjugate gradient method
- 2011-06-05 03:27:28下载
- 积分:1
-
words
windows控制台下的一个小字典程序,可以自己添加字典,使用.(A small dictionary program under windows console, you can add your own dictionary to use.)
- 2014-11-26 11:32:19下载
- 积分:1
-
04760221---
multi input pv for distributed applications
- 2014-01-05 22:54:03下载
- 积分:1