Creating a Class

So I suck at computer programming but really need to pass this class. The other day one of my assignments was to make the following program and after reading the chapter on the topic I still have only the slightest clue of what to do. Any advice or steps in the right the direction would be awesome. Thank you ahead of time and the question is:


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 object 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/13 March 15, 2013 15 March 2013 Demonstrate the class by writing a program that uses it. Be sure your 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.
Topic archived. No new replies allowed.