java.lang.ObjectBoy
public class Boy
This class represents a boy
Constructor Summary | |
---|---|
Boy(java.lang.String name)
Constructor for objects of class Boy |
Method Summary | |
---|---|
int |
getExperience()
|
java.lang.String |
getRelationshipStatus()
help method for toString() method |
boolean |
isTaken()
|
void |
pullGirl(Girl girl)
If given girl is free, this boy is free and given girl wants this boy makes a couple from given girl and this boy |
void |
splitUp()
splits up with actual girlfriend |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Boy(java.lang.String name)
name
- Name of the boyMethod Detail |
---|
public int getExperience()
public java.lang.String getRelationshipStatus()
toString()
method
public boolean isTaken()
true
if this boy has a girlfriend, false
otherwisepublic void pullGirl(Girl girl)
girl
- A girl that this boy is trying to pullpublic void splitUp()
public java.lang.String toString()
toString
in class java.lang.Object