Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. package KOS.Lessons.oop.worker;
  2.  
  3. import java.io.Serializable;
  4.  
  5. abstract class Employee implements Comparable<Employee>, Serializable{
  6. private static final long serialVersionUID = 4479427575105980884L;
  7. String name;
  8. private static int countId;
  9. private int id;
  10.  
  11. public Employee() {
  12. this.id = ++countId;
  13. }
  14.  
  15. public abstract double salaryCount();
  16.  
  17. public String toString(){
  18. return "# " + name;
  19. }
  20.  
  21. public String getName() {
  22. return name;
  23. }
  24.  
  25. public void setName(String name) {
  26. this.name = name;
  27. }
  28.  
  29. public int getId() {
  30. return id;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement