Question: Consider the following code snippet and answer the questions in comments. class Datel public Datefint_month = 1, int_day = 31) [month= _month; day=_daya) int getMonth
Consider the following code snippet and answer the questions in comments. class Datel public Datefint_month = 1, int_day = 31) [month= _month; day=_daya) int getMonth (return month:) void setMonthint m/month me) int getDayOfreturn day.) void setDaylint di[day) private: int day, month B: int main Date "calendar. 'cptr: calendar = new Date [12]: cptr calendar calendar[c].setMonth(1): calendar[c].setDay(31) calendar(1).setMonth(2): calendar(1).setDay(28): I/What is printed by the statement below? cout get Month() getDay] set Month(3): cptr->setDay(31): Il what is printed by the statement below? cout get Month() getDayl)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
