Advertisement
akosiraff

Pieceworker Solution

Oct 29th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/pieceworker-solution/
  3. Create a base Employee class with instance variables and properties: FirstName & LastName. The constructor for Employee should accept values for firstname, lastname and socialSecurityNumber and initial the values. Employee should have a toString method to output the values for each employee.
  4. Create a derived class for an employee type Pieceworker. A pieceworker is paid a fee for each piece completed, i.e., # pieces * fee per piece. Class Pieceworker should add private instance variables fee and pieces. Pieceworker should inherit from Employee; adding in an earnings method to calculate earnings. Create a constructor to initialize firstname, lastname, socialSecurityNumber, fee and pieces. Override the toString method to output all variables.
  5. Create a third class to create objects of Pieceworker, then calculate earnings; output all values including earnings.
  6. Download: http://solutionzip.com/downloads/pieceworker-solution/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement