Sorry for the terrible formatting but I just wanted to know for sure if the following would be considered an Accessor.
So my class definition looks something like this...
class work {
public:
void getInput(); //Mutator
void output(); //Accessor?
//...
So here's the function..
void work::output()
{
dayofweek = day + getMonthvalue(month, year) + ....;
final = dayofweek % 7;
if(final == 0)
cout << "The day of the date is Sunday\n";
else if(final == 1)
cout << "The day of the date is Monday\n";
else if(final == 2)
cout << "The day of the date is Tuesday\n";
/*.
.
.*/
else {
cout << "The day of the day is Saturday\n";
}
}
Some terminology
By this no, not really. Accessor is derived from accessing.