Description: 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.
To Search:
- [JAVA] - JAVA programming, a fine example, it is
File list (Check if you may need any files):
HardWork.doc
HardWork.java