ひどいフォーマットで申し訳ありませんが、次のものがアクセサーと見なされるかどうかを確認したかっただけです。
したがって、私のクラス定義は次のようになります...
class work {
public:
void getInput(); //Mutator
void output(); //Accessor?
//...
だからここに関数があります..
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";
}
}