Question: Please do in C++, HOMEWORK #16-Calendar Program Write a program to print the calendar for a particular month or a particular year. For example, the

Please do in C++,

Please do in C++, HOMEWORK #16-Calendar Program Write a program to printthe calendar for a particular month or a particular year. For example,the : calendar for February 2017 is Feburary 201'7 SunMon Tue WedThu Fri Sat 2 12 19 26 13 20 27 14 2128 10 17 24 15 16 23 18 25 Specifications: To solvethis problem, you will create a number of classes using inheritance andcomposition In Chapter 11 of Malik's book, he uses a class called

HOMEWORK #16-Calendar Program Write a program to print the calendar for a particular month or a particular year. For example, the : calendar for February 2017 is Feburary 201'7 SunMon Tue Wed Thu Fri Sat 2 12 19 26 13 20 27 14 21 28 10 17 24 15 16 23 18 25 Specifications: To solve this problem, you will create a number of classes using inheritance and composition In Chapter 11 of Malik's book, he uses a class called dateType (see pages 774-776), which is designed to store the month, day, and year for calendar dates. Use the dateType class as the initial basis for your program. The class uses the following public and private members Public: void setDate (int month, int day, int year); int getDay) consti int getMonth () const; int getYear) const void printDate () const; dateType (int month-1, int day-l, int year-1900) Private int dMonth; int dDay int dYear; Create the class, and copy the definitions of the class member functions into an appropriate .cpp file. Next, modify the definitions of the function setDate () and the constructor so that the values for the month, day, and year are checked before storing the date into the member variables. If an incorrect month, day, or year is used, use the default values of 1, 1, and 1900 respectively. Add a new public member function, isLeapYear ), to check weather a year is a leap year. HOMEWORK #16-Calendar Program Write a program to print the calendar for a particular month or a particular year. For example, the : calendar for February 2017 is Feburary 201'7 SunMon Tue Wed Thu Fri Sat 2 12 19 26 13 20 27 14 21 28 10 17 24 15 16 23 18 25 Specifications: To solve this problem, you will create a number of classes using inheritance and composition In Chapter 11 of Malik's book, he uses a class called dateType (see pages 774-776), which is designed to store the month, day, and year for calendar dates. Use the dateType class as the initial basis for your program. The class uses the following public and private members Public: void setDate (int month, int day, int year); int getDay) consti int getMonth () const; int getYear) const void printDate () const; dateType (int month-1, int day-l, int year-1900) Private int dMonth; int dDay int dYear; Create the class, and copy the definitions of the class member functions into an appropriate .cpp file. Next, modify the definitions of the function setDate () and the constructor so that the values for the month, day, and year are checked before storing the date into the member variables. If an incorrect month, day, or year is used, use the default values of 1, 1, and 1900 respectively. Add a new public member function, isLeapYear ), to check weather a year is a leap year

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!