Question
class birthday{ private: int day; int month; int year; public: static int count; static int incrementcount(); . }; int main(){ birthday person1(05, 08, 1990); birthday
class birthday{
private:
int day;
int month;
int year;
public:
static int count;
static int incrementcount();
.
};
int main(){
birthday person1(05, 08, 1990);
birthday person[10];
}
Create the appropriate constructor and static variable initialization (Marks 5)
Create member functions to read birth days of person1 and 10 person objects (Marks 5)
Create the increment count() function to increase the count by 1(Marks 5)
Create member function to check if the birthday of any two person are equal(Marks 5)
Write member function and call it in main() to check the birthday of perosn1 is equal to any of the other 10 person objects. If equal increase the static count by 1(Marks 5)
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