Month. The Month Enumeration Should Consist of Twelve Constants Representing The Months
Month. The Month Enumeration Should Consist of Twelve Constants Representing The Months
representing a month and displays the corresponding month as output. To accomplish this,
the student should implement a class named Year that includes an enumeration called
Month. The Month enumeration should consist of twelve constants representing the months
of the year. The student needs to ensure that the program utilizes the Year class and the
Month enumeration to correctly map the input number to the corresponding month name for
display.
#include <iostream>
#include <string>
class Year {
public:
enum Month {
JANUARY = 1,
FEBRUARY,
MARCH,
APRIL,
MAY,
JUNE,
JULY,
AUGUST,
SEPTEMBER,
OCTOBER,
NOVEMBER,
DECEMBER
};
};
int main() {
int monthNumber;
switch (month) {
} else {
}
return 0;