public class Person {
private String firstName;
private String lastName;
// constructor
public Person(String firstName, String lastName){
this.firstName = firstName;
this.lastName = lastName;
}
/**
* Returns a String of the firstName
* @return firstName
*/
public String getFirstName(){
return firstName;
}
/**
* Returns a String of the lastName
* @return lastName
*/
public String getLastName(){
return lastName;
}
/**
* Returns a concatenated string of the Person's name
* @return the Person's first and last name.
*/
public String getName(){
return firstName + " " + lastName;
}
}