//--------------------------------------------------------------------
 //	Method:                 setYear
 //	Description:            Sets the philosopher's year of birth
 //                              (m_year)
 //	Parameters:             An integer and a string with which to set
 //                              the philosopher's year of birth.
 //	Returns:                None
 //	Calls:                  Year object constructor
 //--------------------------------------------------------------------
 public void setYear(int year, string era)
 {
     m_year = new Year(year, era);
 }
 //--------------------------------------------------------------------
 //	Method:                 setYear
 //	Description:            Sets the philosopher's year of birth
 //                              (m_year)
 //	Parameters:             A Year object with which to set the
 //                              philosopher's year of birth.
 //	Returns:                None
 //--------------------------------------------------------------------
 public void setYear(Year year)
 {
     m_year = year;
 }
Exemple #3
0
 //--------------------------------------------------------------------
 //	Method:                 Year
 //	Description:            The copy constructor.  Sets the year
 //                              to the values of the properties of
 //                              the other year.
 //	Parameters:             A Year object.
 //	Returns:                None
 //--------------------------------------------------------------------
 public Year(Year otherYear)
 {
     m_era  = otherYear.m_era;
     m_year = otherYear.m_year;
 }