Model a date class as having integer month, day and year components. Overload the output operator (<<) to display a date object in mm/dd/yyyy format. Overload the insertion opertator (>>) for the date class to enter data for objects (in the form mm/dd/yyyy).

Consider the design of Date class illustrated below: See image.

The Date class models a date using integer month, day, and year values. It has a default constructor that sets the date values to zero,and a parameterized constructor that makes specific values for the date. When a date object is instantiated using the parameterized constructor and when the values of the date date members are using the setDate() method,the parameters are edited using three protected methods. The month parameter must be 1-12,the day parameter must be 28-31(the class code checks this against the specific month),and the year parameter must be greater than 1. If the date parameters are invalid,the user is prompted to re-enter them. The getDate() method returns the date as a sting type,formatted as mm/dd/yyyy.

Using inheritance,develop the code for a class called LongDate,that uses the name of a month as its data attribute. The LongDate class shall also have at least the methods indicated below: See image.

The getDate() method shall return the date in long form(e.g.,May 1,2011)and the getShortDate() should return the date as mm/dd/yyyy. The LongDate class shall edit the date parameters when the parameterized constructor and the setDate() methods are used. Edit criteria are the same as for the date class,and the month name(January,...., December)must begin with an upper case letter. If invalid parameters are specified,the user shall be prompted to re-enter the information until it is correct. The LongDate class should try reuse the edit mothods of the Date class.

Write a program that creates some Date and LDate objects,sets their values,and displays their values. Please comment your code and make good use of indentation and white space. Submit all source code as well as a screen capture of program execution.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.