fork(1) download
  1. In this assignment you will create two Java classes, an Employee class and a Pay Class that have
  2. the following features:
  3.  
  4. Employee class properties:
  5. First Name
  6. Last Name
  7. Employee ID number (sample is A12444)
  8. Pay Object
  9.  
  10. Employee class methods:
  11. Constructor takes the Employee ID Number
  12. Methods to get/set all the other properties but only a get method for Employee ID
  13. Method to get/set pay object
  14.  
  15. Pay class properties:
  16. Hourly Rate (double)
  17. Hours Worked (int)
  18. Withholding Percentage (double)
  19.  
  20. Pay class methods:
  21. Method to get/set all the properties
  22. Method to calculate raw pay rate (hours times rat)
  23. Method to calculate overtime pay (hours over 40 times rate * 1.5)
  24. Method to calculate total pay after withholding (calculate total pay minus withholding times total)
  25.  
  26.  
  27. Write a Java program that uses these classes to perform the following :
  28. 1. Create a ListArray object to hold employees
  29.  
  30. 2. Create a menu program that has three options and will loop until the user selects D:
  31. A. Enter Employee Data
  32. B. Search for Employee Data
  33. C. List All Data
  34. D. Exit
  35.  
  36. 3. If the user selects A then prompt the user to enter:
  37. Employee first name
  38. Employee last name
  39. Employee ID number (a String value)
  40. Hourly Rate
  41. Hours worked
  42. Withholding percentage
  43.  
  44. 4. Using the input data to create a Pay Object and then create an Employee object
  45.  
  46. 5. Store the Employee object in the ListArray
  47.  
  48. 6. If the user enters B prompt the user for an Employee number.
  49.  
  50. 7. If the number is found then display
  51. first name
  52. last name
  53. employee ID
  54. raw pay rate
  55. overtime pay
  56. total pay after withholding
  57. 8. If the number is not found then display an error.
  58.  
  59. 9. If the user enters C then for each employee in the list display the information in item 7.
Runtime error #stdin #stdout #stderr 0.01s 5352KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Fail: Unrecognised input