All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.logic.SubjectInfo

java.lang.Object
   |
   +----guinea.logic.SubjectInfo

public class SubjectInfo
extends Object
implements Serializable
The SubjectInfo objects store information about test's subjects. Subject's name, age and sex can be stored. This class is not currently yet used.


Variable Index

· FEMALE
The subject's sex is female.
· MALE
The subject's sex is male.

Constructor Index

· SubjectInfo()
Construct a new subject.
· SubjectInfo(String)
Construct a new subject with given name.
· SubjectInfo(String, float, int)
Construct a new subject with given name, age and sex.

Method Index

· getAge()
Get age of subject
· getName()
Get name of subject.
· getName(String)
Set name of subject.
· getSex()
Get sex of subject.
· setAge(int)
Set age of subject.
· setSex(int)
Set sex of subject.
· toString()
Get string representation of the subject

Variables

· MALE
 public static final int MALE
The subject's sex is male.

· FEMALE
 public static final int FEMALE
The subject's sex is female.

Constructors

· SubjectInfo
 public SubjectInfo(String name,
                    float age,
                    int sex)
Construct a new subject with given name, age and sex.

Parameters:
name - the name of the subject
age - age in years
sex - sex of subject, MALE or FEMALE
· SubjectInfo
 public SubjectInfo(String name)
Construct a new subject with given name.

Parameters:
name - The subject's name.
· SubjectInfo
 public SubjectInfo()
Construct a new subject.

Methods

· getName
 public String getName()
Get name of subject.

Returns:
name of subject or null if no name has been set.
· getName
 public void getName(String name)
Set name of subject. Preferably use the format 'Lastname, Firstname Secondname ...'.

· getSex
 public int getSex()
Get sex of subject.

· setSex
 public void setSex(int sex)
Set sex of subject.

· getAge
 public float getAge()
Get age of subject

Returns:
age in years or negative it not set.
· setAge
 public void setAge(int age)
Set age of subject.

Parameters:
age - age in years.
· toString
 public String toString()
Get string representation of the subject

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index