Question: MAKE SURE YOU ARE USING STATIC MEMBERS PLEASE WEITE CODE IN C++ Of Year that takes an integer 2. Day of the Year Assuming that

 MAKE SURE YOU ARE USING STATIC MEMBERS PLEASE WEITE CODE INMAKE SURE YOU ARE USING STATIC MEMBERS
PLEASE WEITE CODE IN C++
C++ Of Year that takes an integer 2. Day of the Year

Of Year that takes an integer 2. Day of the Year Assuming that a vear has 365 days, write a class named DayOfYear that to representing a day of the year and translates it to a string consisting of the month by day of the month. For example, Day 2 would be January 2. Day 32 would be February 1. Day 365 would be December 31. The constructor for the class should take as parameter an integer representing the day of the year, and the class should have a member function print() that prints the day in the month-day format. The class should have an integer a mber variable to represent the day and should have static member variables of ps string to assist in the translation from the integer format to the month-day format Test your class by inputting various integers representing days and printing out the representation in the month-day format. Day of the Year problem Make sure you are using static members. Use consts where appropriate. You should have a .h and a .cpp file with code for your DayOfYear class and a .cpp file with your main. Make sure you are creating objects for a Janurary date, a December date and one of your choice from another month and printing them using the print method. The static string referred to in the problem spec should at least be month names (ex: "January", "February"). An array of them would likely be an efficient way to store them but its not a requirement. You can use this static array of strings when its time to translate your day of the year number to the string month name. You will likely be accessing this in your print method

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!