Objective: This assignment will provide further practice with implementing classes.
Task: For this homework, you will write a class called Date, in the files date.h and [url removed, login to view], for creating and using objects that will store valid dates of the year.
This class should be portable, so it should work with any up-to-date C++ compiler. Make sure that it works with g++ before you hand it in. You should write some test programs of your own to test the functionality of the class.
Program Details and Requirements:
1) An object of type Date should represent a calendar date in terms of month, day, and year, as on a 12-month A.D. calendar. The valid months are January through December, a valid day must correspond to a valid day for the given month, and the year must be a positive number. Your object should also store a format setting, to be used for display of dates to the screen. There will be more than one possible format. The class features (public interface) should work exactly as specified, regardless of what program might be using Date objects.
Note: For purposes of easy input (from keyboard or into functions), date values will be specified with integers. Month values will be 1 for January, 2 for February, etc... on to 12 for December. A valid day value will be an integer between 1 and the number of days in the month. Valid year values are positive numbers.
2) Your Date class must provide the following services (i.e. member functions) in its public section. These functions will make up the interface of the Date class. Make sure you use function prototypes as specified here. (You may write any other private functions you feel necessary, but the public interface must include all the functionality described here).
The Date class should have a constructor that allows the user to specify the values for the month, day, and year, using integer values, when the object is declared. If any of the values would result in an invalid date, the constructor should throw out the erroneous information and initialize the object to represent 1/1/2000 (January 1, 2000) instead. Also, you should allow a Date object to be declared without specified values, in which case it should initialize to 1/1/2000 also.
Examples: These declarations should be legal, and the comment gives the initialized date
Date d1; // initializes to Jan 1, 2000
Date d2(3,4,1992); // initializes to March 4, 1992
Date d3(13,30,1990); // invalid month, initializes to Jan 1, 2000 instead.
The rest is accessible from here: [url removed, login to view]~myers/cop3330/hw/[url removed, login to view]
7 freelance font une offre moyenne de $124 pour ce travail
Expert in use of C++ language. This cost is to develop all general requirements + leap years. If you need extra B (Julian day), I could do this for $10 more. Is delivered with a tester in 1 day.
I've mastered C/C++/C#/Java programming and helped many customers . I'm sure I can fulfil your job successfully. I hope our collaboration to produce a good outcome that makes u happy. Best regards.