Opus5
Class Parent

java.lang.Object
  |
  +--Opus5.Person
        |
        +--Opus5.Parent

public class Parent
extends Person

Records some basic information about a parent.

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

Field Summary
protected  Person[] children
          The children of this parent.
 
Fields inherited from class Opus5.Person
female, male, name, sex
 
Constructor Summary
Parent(java.lang.String name, int sex, Person[] children)
          Constructs a Parent with the specified name, sex, and children.
 
Method Summary
 Person getChild(int i)
          Returns the specified child of this parent.
 java.lang.String toString()
          Returns a string representation of this parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

protected Person[] children
The children of this parent.
Constructor Detail

Parent

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

getChild

public Person getChild(int i)
Returns the specified child of this parent.
Returns:
The specified child of this parent.

toString

public java.lang.String toString()
Returns a string representation of this parent. This method is not implemented.
Overrides:
toString in class Person
Returns:
A string representation of this parent.