FileDocCategorySizeDatePackage
Person.javaAPI DocExample884Tue Oct 22 21:03:22 BST 2002com.oreilly.javaxp.junit

Person

public class Person extends Object
author
Eric M. Burke
version
$Id: Person.java,v 1.1 2002/10/23 02:03:22 jepc Exp $

Fields Summary
private String
firstName
private String
lastName
Constructors Summary
public Person(String firstName, String lastName)

        if (firstName == null && lastName == null) {
            throw new IllegalArgumentException("Both names cannot be null");
        }
        this.firstName = firstName;
        this.lastName = lastName;
    
Methods Summary
public java.lang.StringgetFirstName()

        return this.firstName;
    
public java.lang.StringgetFullName()

        String first = (this.firstName != null) ? this.firstName : "?";
        String last = (this.lastName != null) ? this.lastName : "?";

        return first + " " + last;
    
public java.lang.StringgetLastName()

        return this.lastName;