Company
Hiring system
Link to Test.java Doc created by Java Doc Documentation java docLink to Packages
Description : Consider a company that keeps tracks of its staff consisting of employees and volunteers. Everybody has two immutable attributes :a name and an address, employees (unlike volunteers ) additionally have a SIN immutable attributes. Employee are paid a salary(per month) or wages(per hours). The following menu operations are available in user defined data structure(single link list) such as hiring a employee, hiring an volunteer, hiring a contract employee, raising a salary/wage of a permanent/contract employee, change of data structure at the run time from list to array, saving the object into the file and retrieving from the file. The design should be flexible for the change in either case i.e.: accommodate other kinds of employees and change of data structure. Implementation DetailsThere are four package
Container Package : This Contains different classes to implement the Generic List or Generic Array Basically it is divided into two part one is List of Container /Array and Containers of different types of Employee List of Container /Array is used stored different type of Containers. In order to switch from one implementation to other implementation at run time they are derived from common Abstract class Impl. You can switch from one implementation to other implementation at any time. After switching you are free to do the basic operations ,such as Hiring a contract Employee ,Raising as Salary etc , then again you can go back to the previous implementation. If your List contains more than 10 elements ( Array size) and now you are switching the implementation then only first ten elements will be copied and it will throws an exception for the remaining elements. Array size is taken as ten . Containers of different types of Employee is derived from the Common Base Abstract Class Container . Empl Package : This contains different classes to implements Employee MyException Package : This contains classes to implements Exception handling such as List Empty, EmployeePresent Exception etc. Global :Package : This package contains one class(MyInput) and used for data Input. Executable File (Test.java)
|