Class Rat

java.lang.Object
  extended by Rat

public class Rat
extends Object

Holds information for a rat and its performance in a standard maze.

Version:
Summer 2014
Author:
Tina Comston

Constructor Summary
Rat()
          Constructor for objects of class Rat.
Rat(String inRFID, char inGender, boolean inVac)
          Constructor for objects of class Rat.
 
Method Summary
 char getGender()
          Return the gender of the rat.
 boolean getIsVaccinated()
          Return the vaccination status of the rat.
 String getRFID()
          Return the value of the rat's RFID chip identification.
 void setGender(char inGender)
          Set the gender of the rat to the explicit parameter.
 void setIsVaccinated(boolean inVac)
          Set the vaccination status of the rat to the explicit parameter.
 void setRFID(String inRFID)
          Set the rat's RFID chip identification equal to the explicit parameter.
 String toString()
          Formats a string with rat's number of trials, total time for trials, average time per trial.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rat

public Rat()
Constructor for objects of class Rat. Default values are: chipRFID set to null gender to ' ' set vaccination status to false


Rat

public Rat(String inRFID,
           char inGender,
           boolean inVac)
Constructor for objects of class Rat. Sets the instance variables equal to the corresponding explicit parameters.

Parameters:
inRFID - implanted chip identifier.
inNumTrials - number of trials to criterion.
inttlTime - time for all trials.
Method Detail

getGender

public char getGender()
Return the gender of the rat.

Returns:
char gender of the rat

getIsVaccinated

public boolean getIsVaccinated()
Return the vaccination status of the rat.

Returns:
boolean vaccination status of rat

getRFID

public String getRFID()
Return the value of the rat's RFID chip identification.

Returns:
String The chip ID of the rat.

setGender

public void setGender(char inGender)
Set the gender of the rat to the explicit parameter.

Parameters:
inGender - gender of the rat

setIsVaccinated

public void setIsVaccinated(boolean inVac)
Set the vaccination status of the rat to the explicit parameter.

Parameters:
inVac - vaccination status of the rat

setRFID

public void setRFID(String inRFID)
Set the rat's RFID chip identification equal to the explicit parameter.

Parameters:
inRFID - RFID chip of the rat.

toString

public String toString()
Formats a string with rat's number of trials, total time for trials, average time per trial. Format should be:
      Rat RFID XXXXXXXXX
      Gender: X
      Vaccination status: XXXXX
 
The XXX's are replaced by actual values. Following is an example:
      Rat chip id OH12345
      Gender: M
      Vaccination status: True
 

Overrides:
toString in class Object
Returns:
String String with rat's chipid, gender, and vaccination status.