c++ help..
hello please read the instruction good if the program isn't same as the instruction i won't buy any$$$
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 Modification
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 specified 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:
++ prefix and postfix 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 first day of the year.
-- prefix and postfix decrement operators. These operators should modify the DayOfYear
object so that it represents the previous day. If the day is already the first day of the
year, the new value of the object will represent the last day of the year.
im done with number 2 i just need someone to code number 3 i can give him/her number 2 to modify it. i won't buy down or start price i will pay full after the program is ready to go + provide me photo of the output.
thanks.
10 years ago 20
Purchase the answer to view it
- dayofyearprogram2.zip
- dayofyearprogram_0.zip
- Basic Principles of Free Enterprise.
- SCI 245 Week 7 Assignment Climate Change Proposal
- How did the Consumer Revolution of the late 1950s and the 1960s affect the Cold War? What aided the expansion of consumption?
- The first assignment is a short paper written in the style of a letter to the editor in the Wall Street Journal. Consult current issues of the Wall Street Journal for potential topics and to see how to present a brief and cogent argument (read several le
- Letter to Freud
- Please search online and find 10 online news stories on ONE of the following topics: a) CHINA AND MACROECONOMIC IMBALANCES (i.e. excessive dependence on exports and investment), b) CHINA AND LABOR or c) CHINA AND THE RENMINBI. The news pieces should be pu
- Explain the role of the term “manifest destiny” in the expansion of the United States from 1818 to 1849. Comment on some of the entries of your classmates. Use the discussion rubric for reference. I have only 10 dolars there you have to do 20 words
- Biomedical Engineering
- Whinch of the following did not cause the Apache to rebel?
- Criminologist Advisor