Advertisement
Guest User

code12

a guest
Jul 23rd, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1.  
  2. public class Employee{
  3. private String name;
  4. private double hoursWorked;
  5. private double hourlyRate;
  6. private double fedTaxRate;
  7. private double stateTaxRate;
  8. private String address;
  9. private String phone;
  10. private String SSN;
  11. double y = 1;
  12.  
  13. Employee(String n, double w, double p, double ft, double st, String ad, String ph, String sn) {
  14. this.name = n;
  15. this.hoursWorked = w;
  16. this.hourlyRate = p;
  17. this.fedTaxRate = ft;
  18. this.stateTaxRate = st;
  19. this.address = ad;
  20. this.phone = ph;
  21. this.SSN = sn;
  22. }
  23.  
  24.  
  25.  
  26.  
  27.  
  28. public double grossPay(double hr, double hw) {
  29. double grossPay = (hourlyRate * hoursWorked);
  30. return grossPay;
  31. }
  32.  
  33. public void setFedTax(double fedTaxRate) {
  34. this.fedTaxRate = fedTaxRate;
  35. }
  36. public double getFedTax() {
  37. return fedTaxRate;
  38. }
  39.  
  40. public void setStateTax(double stateTaxRate) {
  41. this.stateTaxRate = stateTaxRate;
  42. }
  43.  
  44. public double getStateTax() {
  45. return stateTaxRate;
  46. }
  47.  
  48. public String getName() {
  49. return name;
  50. }
  51.  
  52. public void setName(String name) {
  53. this.name = name;
  54. }
  55.  
  56. public double getHoursWorked() {
  57. return hoursWorked;
  58. }
  59.  
  60. public void setHoursWorked(double hoursWorked) {
  61. this.hoursWorked = hoursWorked;
  62. }
  63.  
  64. public double getHourlyPayRate() {
  65. return hourlyRate;
  66. }
  67.  
  68. public void setHourlyPayRate(double hourlyRate) {
  69. this.hourlyRate = hourlyRate;
  70. }
  71.  
  72. public String getAddress(){
  73. return address;
  74. }
  75.  
  76. public void setAddress(String address) {
  77. this.address = address;
  78. }
  79.  
  80. public String getPhone(){
  81. return phone;
  82. }
  83.  
  84. public void setPhone(String phone) {
  85. this.phone = phone;
  86. }
  87.  
  88. public String getSSN() {
  89. return SSN;
  90. }
  91. public void setSSN(String SSN) {
  92. this.SSN = SSN;
  93. }
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement