Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Employee {
- protected String firstName;
- protected String lastName;
- protected String ssn;
- public Employee() {
- this.firstName = "";
- this.lastName = "";
- this.ssn = "";
- }
- public Employee(String fn, String ln, String ssn) {
- this.firstName = fn;
- this.lastName = ln;
- this.ssn = ssn;
- }
- public String toString() {
- return String.format("Employee Info is: %s %s whose SSN is: %s", firstName, lastName, ssn);
- }
- /**
- * @return the firstName
- */
- public String getFirstName() {
- return firstName;
- }
- /**
- * @param firstName the firstName to set
- */
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
- /**
- * @return the lastName
- */
- public String getLastName() {
- return lastName;
- }
- /**
- * @param lastName the lastName to set
- */
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
- /**
- * @return the ssn
- */
- public String getSsn() {
- return ssn;
- }
- /**
- * @param ssn the ssn to set
- */
- public void setSsn(String ssn) {
- this.ssn = ssn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement