Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. public class Employee
  2. {
  3.     private String myEmployeeName;
  4.     private int    myTaxDeductions = 1;
  5.     private String myMaritalStatus = "single";
  6.  
  7.     //--------- constructor #1 -------------
  8.     public Employee(String EmployeName)
  9.     {
  10.         this(employeeName, 1);
  11.     }
  12.  
  13.     //--------- constructor #2 -------------
  14.     public Employee(String EmployeName, int taxDeductions)
  15.     {
  16.        this(employeeName, taxDeductions, "single");
  17.     }
  18.  
  19.     //--------- constructor #3 -------------
  20.     public Employee(String EmployeName,
  21.            int taxDeductions,
  22.            String maritalStatus)
  23.     {
  24.        this.employeeName    = employeeName;
  25.        this.taxDeductions   = taxDeductions;
  26.        this.maritalStatus   = maritalStatus;
  27.     }
  28. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement