Class Boy

java.lang.Object
  extended by Boy

public class Boy
extends java.lang.Object

This class represents a boy

Author:
Rastislav Mirek

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

Boy

public Boy(java.lang.String name)
Constructor for objects of class Boy

Parameters:
name - Name of the boy
Method Detail

getExperience

public int getExperience()
Returns:
number of ex-girlfriends that this boy has had

getRelationshipStatus

public java.lang.String getRelationshipStatus()
help method for toString() method

Returns:
string value that tells if the boy is in relationship(with who) or not

isTaken

public boolean isTaken()
Returns:
true if this boy has a girlfriend, false otherwise

pullGirl

public 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

Parameters:
girl - A girl that this boy is trying to pull

splitUp

public void splitUp()
splits up with actual girlfriend


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object