subject

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.

need to figure out how to get my main function to dispaly the day THAT THE USER INPUTS in the correct month-day format.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Match the steps of the process to julia's analysis. 1. analyze choices. current costs for making phone calls to foreign countries averages between five and ten cents a minute. 2. determine the goals. julia needs to reduce the cost of telecommunications without reducing her employees' ability to do their jobs. 3. gather data. the corporate computer network will be able to handle the increased traffic that will occur as a result of voip. 4. evaluate the decision. julia will have her it department set up voip in the smallest domestic office. 5. make the decision. julia will have employees document the benefits and problems that result from using the new technology.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 22.06.2019 15:00
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
You know the right answer?
Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing...
Questions
question
Mathematics, 15.04.2020 00:26
question
Biology, 15.04.2020 00:27
question
Mathematics, 15.04.2020 00:27
question
Chemistry, 15.04.2020 00:27
Questions on the website: 13722367