/** * A simple model of a person * * @author CSC 142 * @version 1.0 */ public class Person { // a person is defined by a name and an age private String name; private int age; /** * Creates a person with a default name and age */ public Person() { name = "Sara"; age = 25; } /** * Creates a person given a name and an age * * @param name * the name of the person * @param age * the age of the person */ public Person(String name, int age) { this.name = name; this.age = age; } /** * Prints the name and age of the person */ public void speak() { // void means that speak doesn't return // a value System.out.println("My name is " + name + ", and my age is " + age + "."); } }