Postﬁx increment operators: hi i need assist with my assignment in c++ :
2. Day of the Year
Assuming that a year has 365 days, write a class named DayOfYear that takes an integer
representing a day of the year and translates it to a string consisting of the month followed
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 member variable to represent the day
and should have static member variables of type 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 their
representation in the month–day format.
3. Day of the Year Modiﬁcation
Modify the DayOfYear class, written in an earlier Programming Challenge, to add a
constructor that takes two parameters: a string representing a month and an integer in the
range 0 through 31 representing the day of the month. The constructor should then initialize
the integer member of the class to represent the day speciﬁed by the month and day of month
parameters. The constructor should terminate the program with an appropriate error
message if the number entered for a day is outside the range of days for the month given.
Add the following overloaded operators:
++ preﬁx and postﬁx increment operators. These operators should modify the DayOfYear
object so that it represents the next day. If the day is already the end of the year, the
new value of the object will represent the ﬁrst day of the year.
— preﬁx and postﬁx decrement operators. These operators should modify the DayOfYear
object so that it represents the previous day. If the day is already the ﬁrst day of the
year, the new value of the object will represent the last day of the year.
i use visual studio to debug the programs should work in visual studio.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Australia Assessments has gained an international reputation of being the leading website in custom assignment writing services. Once you give us the instructions of your paper through the order form, we will complete the rest.
As we work towards providing the best custom assignment services, our company provides assignment services for any type of academic essay. We will help you develop professionally written essays that are rich in content and free from plagiarism.
Admission and Business Papers
Our skilled team of professional writers will ensure that we help you craft a remarkable admission essay for your desired Master's program in your institution of choice. We won't stop there. Once you enter the job market, we will be available to secure you a position at your desired worksite by creating an outstanding portfolio or resume.
Editing and Proofreading
Our editorial team is always available for all editing and proofreading services. They check completed papers by our writers and also provide professional opinions to papers completed by our clients.
We harbor professional academic writers with different qualifications in diverse academic fields. As such, we are capable of handling both simple and technical papers. Ensure that you provide us with correct and complete instructions in the order form.