ps3.family
Interface Person


public interface Person

This represents a human being.
A Person is a mutable type.

Specification Field Summary
NameTypeNotes
 spouse
Person
optional
 parent
set
set of Person
note: size of parent is exactly 2


Method Summary
 Person[] parents()
          returns a Person array, result[], of length 2 such that each Person in this.parents in result[i] (where 0 <= i <= 1)
 void setSpouse(Person p)
          sets this.spouse to p
 Person spouse()
          returns this.spouse if present, or null otherwise
 

Method Detail

spouse

public Person spouse()
Requires:
true
Modifies:
nothing
Effects:
returns this.spouse if present, or null otherwise

parents

public Person[] parents()
Requires:
true
Modifies:
nothing
Effects:
returns a Person array, result[], of length 2 such that each Person in this.parents in result[i] (where 0 <= i <= 1)

setSpouse

public void setSpouse(Person p)
Requires:
true
Modifies:
this.spouse
Effects:
sets this.spouse to p