subject

Design a class called Date that has integer data members to store month, day, and year. The class should have a three-parameter default constructor that allows the date to be set at the time a new Date object is created. If the user creates a Date without passing any arguments, or if any of the values passed are invalid, the default values of 1, 1, 2001 (i. e., January 1, 2001) should be used. The class should have member functions to print the date in the following formats:3/15/13March 15, 201315 March 2013Demonstrate the class by writing a program that uses it. Be sure you program only accepts reasonable values for month and day. The month should be between 1 and 12. The day should be between 1 and the number of days in the selected month.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
Design a class called Date that has integer data members to store month, day, and year. The class sh...
Questions
question
Mathematics, 17.11.2020 01:00
question
Mathematics, 17.11.2020 01:00
question
Mathematics, 17.11.2020 01:00
question
Physics, 17.11.2020 01:00
Questions on the website: 13722361