Opus5
Class Person

java.lang.Object
  |
  +--Opus5.Person
Direct Known Subclasses:
Parent

public class Person
extends java.lang.Object

Records some basic information about a person.

Version:
$Id: Person.java,v 3.1 1998/07/28 01:32:17 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.

Field Summary
 int female
          Sex: female
 int male
          Sex: male
protected  java.lang.String name
          The name of this person.
protected  int sex
          The sex of this person.
 
Constructor Summary
Person(java.lang.String name, int sex)
          Constructs a Person with the specified name and sex.
 
Method Summary
 java.lang.String toString()
          Returns the name of this person.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

male

public final int male
Sex: male

female

public final int female
Sex: female

name

protected java.lang.String name
The name of this person.

sex

protected int sex
The sex of this person.
Constructor Detail

Person

public Person(java.lang.String name,
              int sex)
Constructs a Person with the specified name and sex.
Parameters:
name - The name of this person.
sex - The sex of this person.
Method Detail

toString

public java.lang.String toString()
Returns the name of this person.
Overrides:
toString in class java.lang.Object