登录
首页 » Java » HardWork

HardWork

于 2010-04-27 发布 文件大小:3KB
0 266
下载积分: 1 下载次数: 0

代码说明:

说明:  上转型对象 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.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • BinaryTrees
    Binary tree example in C++
    2014-09-30 11:56:13下载
    积分:1
  • rudeMC
    matlab下的电力系统可靠性评估算法,算例为RTS79(matlab under the power system reliability evaluation algorithm, numerical example is RTS79)
    2021-04-25 13:38:46下载
    积分:1
  • GAaPSO
    MATLAB环境下,有关遗传算法以及粒子群算法的程序(the program of GA and PSO in matlab)
    2014-12-05 13:44:26下载
    积分:1
  • MATLAB-R2008shuzituxiangchuli
    此为《MATLABR2008数字图像处理》的开源代码,希望大家共同提高。(This is MATLABR2008 digital image processing, the source code, I hope everyone together.)
    2015-01-27 17:13:41下载
    积分:1
  • Houselder
    houselder算法的matlab程序,对于初学者有用(Houselder algorithm matlab procedures, useful for beginners)
    2012-04-16 20:47:08下载
    积分:1
  • alpharnd_shuruzhiguji_wuqiongjianyan
    对一组滚动轴承振动信号做分布图,包括稳定分布,直方图等。(For a group of vibration signals do distribution, including stable distribution histogram.)
    2015-08-28 16:21:51下载
    积分:1
  • e.m
    Matlab仿真程序,介绍了数据的程序结构、运用和算法设计。(Matlab simulation program, introduced procedures for data structure, application and algorithm design.)
    2008-12-31 13:04:43下载
    积分:1
  • Exercise1
    程序主要包含幂级数展开逼近余弦及在同一坐标下显示多个曲线。压缩包中还包含相关的参考资料。(Program mainly includes power series expansion approximation cosine and displayed in the same coordinate multiple curves. Compressed package also contains the associated reference materials.)
    2013-09-06 08:24:10下载
    积分:1
  • xihua
    matlab,图像细化函数,适合字符图像细化(matlab, image thinning function for the character image thinning)
    2010-12-31 16:07:34下载
    积分:1
  • net_pb
    matlab的bp神经网络源程序,和数据库相连接。(matlab source of bp neural network, and databases connected.)
    2010-03-10 10:56:13下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载