Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Do it in C + + . Date Class Project In this project, you should design a Date class and use it to create a
Do it in CDate Class Project In this project, you should design a Date class and use it to create a calendar application that has many features. You are not limited to the features included in these instructions, feel free to add any other components you find useful. Note: A normal year has days. A leap year has days the extra day is February In this project, you must take this fact into account. The rules that determine leap years are provided later in these instructions. Design the Date class, to be used in your application, containing: A private data member month of type integer that holds the dates month. A private data member day of type integer that holds the dates day. A private data member year of type integer that holds the dates year. A default constructor that sets the date to January Accessors for each member variable. Mutators for each member variable. A member function that prints on the screen a date in the form mm dd yyyy A member function that returns the day name of a date ex Sunday, Monday Note that the day for January of the year was a Monday. A member function that prints a date including the name of the day and the name of the month as strings ex: Tuesday, April The overloaded subtraction operator that returns an integer that is the difference in days between two Date objects. The overloaded increment operator that modifies the Date object so that it represents the next day. The overloaded decrement operator that modifies the Date object so that it represents the previous day. The operator must not decrement dates prior to January Write a program that thoroughly tests your Date class. Consider using the following functions in your program you can use more functions The implementations of these functions are left to you; they can be members of the Date class, friends of it or just regular standalone functions. A function that tests whether a year is leap. A function that calculates and returns a date by adding a fixed number of days to the current date. A function that calculates and returns a date by subtracting a fixed number of days from the current date. A function that returns the number of days passed in the current year. A function that returns the number of days remaining in the current year. A function that prints the calendar for the current month. A function that prints the holidays of any year. Rules for determining leap years: Leap Years are any year that can be exactly divided by such as etc Except if it can be exactly divided by then it isn't such as etc Except if it can be exactly divided by then it is such as etc List of US federal holidays: New Year's Day January st Martin Luther King, Jr Day Third Monday of January President's Day Third Monday of February Memorial Day Last Monday of May Independence Day July th Labor Day First Monday of September Columbus Day Second Monday of October Veterans Day November th Thanksgiving Day Fourth Thursday of November Christmas Day December th
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started