Question: C++ program Define a class called Month. Your class will have one member variable of type int to represent a month (1 for January, 2

C++ program  C++ program Define a class called Month. Your class will have

Define a class called Month. Your class will have one member variable of type int to represent a month (1 for January, 2 for February, and so forth). Include all the following member functions: --constructor to set the month using the first three letters in the name of the month as three arguments, such as jan for month 1. --a constructor to set the month using an integer as an argument (1 for January, 2 for February, and so forth) -- default constructor --an input member function that reads the month as an integer --an input member function that reads the month as the first three letters in the name of the month --an output member function that outputs the month as an integer -an output member function that outputs the month as the first three letters in the name of the month --member function that returns the next month as a value of type Month. Prompt the user to enter a month in int (make this a dynamic variable), and output the first three letters of the month and the number of the month. You may also experiment initializing your objects with the various constructors

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!