Answered step by step
Verified Expert Solution
Question
1 Approved Answer
how to change the if statement in the main into the private member function! help me explain it clear //Class with Private Members //Program to
how to change the if statement in the main into the private member function! help me explain it clear //Class with Private Members //Program to demonstrate the class DayOfYear. #include using namespace std; class DayOfYear public: void input(); void output(); void set(int newMonth, int new Day); //Mutator functions to set or change the values of objects int get Month(); //Accessor function: Returns the month, 1 for January, 2 for February, etc. int getDay(); //Accessor function: Returns the day of the month. private: void checkDate(); int month; int day; int main() DayOfYear today, Batman Birthday: cout > month; cout > day; checkDate(); void DayOfYear::output) cout 12) 11 (day 31)) cout
how to change the if statement in the main into the private member function!
help me explain it clear
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started