|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.family.Marriage
public class Marriage
This class represents a marriage between two people. Ain't love grand? Each marriage consists of a husband, a wife, a date, and a location.
| Constructor Summary | |
|---|---|
Marriage(Person husband,
Person wife)
Creates a marriage between a husband and a wife. |
|
| Method Summary | |
|---|---|
Date |
getDate()
Returns the date on which the husband and wife were married. |
Person |
getHusband()
Returns the husband in this marriage. |
String |
getLocation()
Returns the location at which the husband and wife were married. |
Person |
getWife()
Returns the wife in this marriage. |
void |
setDate(Date date)
Sets the date on which the husband and wife were married. |
void |
setLocation(String location)
Sets the location at which the husband and wife were married. |
String |
toString()
Returns a brief description of this marriage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Marriage(Person husband,
Person wife)
Person.addMarriage(Marriage).
IllegalArgumentException - The husband is not Person.MALE or
the wife is not Person.FEMALE.| Method Detail |
|---|
public Person getHusband()
public Person getWife()
public Date getDate()
public void setDate(Date date)
public String getLocation()
public void setLocation(String location)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||