/** * A simple model of a person * @author CSC 142 * @version 1.0 * */ public class Person { // a person is defined by an age and a name private int age; private String name; /** * Creates a person given a name and an age * @param n the name of the person * @param a the age of the person */ public Person(String n, int a) { age = a; name = n; } /** * Prints the name and age of the person */ public void speak() { System.out.println("My name is " + name + ". My age is " + age + "."); } }