Roles in OOP





Abstract Data Types (ADT)





New DayOfYear Definition

class DayOfYear { public: void Input( ); void Output( ); void Set( int newMonth, int newDay ); void Set( int newMonth ); int GetMonthNumber( ); int GetDay( ); private: int m_month; int m_day; };



public versus private





Member Functions

Because the data members are now private, public member functions are written to provide indirect access to the data for the class user.





Member Function Guidelines