Created
September 23, 2011 21:31
-
-
Save basgys/1238491 to your computer and use it in GitHub Desktop.
Person class
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
package ch.hegarc.ig.person.business; | |
public class Person { | |
private Integer number; | |
private String firstName; | |
private String lastName; | |
public Person() { | |
this(null, null, null); | |
} | |
public Person(Integer number, String firstName, String lastName) { | |
this.number = number; | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
public void print() { | |
System.out.println(String.format("%s %s %s", number.toString(), firstName, lastName)); | |
} | |
public Integer getNumber() { | |
return number; | |
} | |
public void setNumber(Integer number) { | |
this.number = number; | |
} | |
public String getFirstName() { | |
return firstName; | |
} | |
public void setFirstName(String firstName) { | |
this.firstName = firstName; | |
} | |
public String getLastName() { | |
return lastName; | |
} | |
public void setLastName(String lastName) { | |
this.lastName = lastName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment