Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. public abstract class Employee{
  2. private String name ;
  3. private String address;
  4. private int number;
  5.  
  6. public Employee(String name , String address, int number){
  7. system.out.printn("Constructing an Employee");
  8. this.name = name;
  9. this.address = address;
  10. this.number = number;
  11. }
  12.  
  13. public double computePay(){
  14. System.out.println("Inside Employee computePay");
  15. return 0.0;
  16. }
  17.  
  18. public void mailCheck(){
  19. System.out.println("Mailing a check to "+this.name+" "+this.address);
  20. }
  21.  
  22. public String toString(){
  23. return name+" "+address+" "+number;
  24. }
  25.  
  26. public String getName(){
  27. return name;
  28. }
  29.  
  30. public String getAddress(){
  31. return address;
  32. }
  33. public void setAddress(){
  34. address = newAddress;
  35. }
  36.  
  37. public int getNumber(){
  38. return number;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement