Advertisement
Guest User

Untitled

a guest
Mar 9th, 2012
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. public class CommissionedEmployee extends Employee
  2. {
  3. static double commRate;
  4. static double salesMade;
  5.  
  6. public CommissionedEmployee(String firstName, String lastName, String SINNumber, int startMonth, int startYear, double salesMade, double commRate)
  7. {
  8. super(firstName, lastName, SINNumber, startMonth, startYear);
  9. }
  10.  
  11. public static double getcommRate()
  12. {
  13. return commRate;
  14. }
  15. public static double setcommRate()
  16. {
  17. return commRate = setcommRate();
  18. }
  19.  
  20. public static double getSalesMade()
  21. {
  22. return salesMade;
  23. }
  24. public static double setsalesMade()
  25. {
  26. return salesMade = setsalesMade();
  27. }
  28.  
  29. public String getEmployeeDetails()
  30. {
  31. return ("This Employee is " + firstName + lastName + " this employee has the SIN " + sinNumber + "and is " + gender + ". This is a commisioned employee");
  32. }
  33.  
  34. public double getEarnings()
  35. {
  36. return commRate * salesMade;
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement