This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public abstract class Employee implements Cloneable { | |
private int id; | |
private String name; | |
private int numOfExp; | |
private String[] skills; | |
public int getId() { | |
return id; | |
} | |
public void setId(int id) { | |
this.id = id; | |
} | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public int getNumOfExp() { | |
return numOfExp; | |
} | |
public void setNumOfExp(int numOfExp) { | |
this.numOfExp = numOfExp; | |
} | |
public String[] getSkills() { | |
return skills; | |
} | |
public void setSkills(String[] skills) { | |
this.skills = skills; | |
} | |
@Override | |
public String toString() { | |
return "Employee [id=" + id + ", name=" + name + ", numOfExp=" + numOfExp + ", skills=" | |
+ Arrays.toString(skills) + "]"; | |
} | |
@Override | |
protected Object clone() throws CloneNotSupportedException { | |
return super.clone(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment