Question: C + + pls Assignment: Write the header file DateManager.h for a class DateManager with the following specifications: Private Data Members: year: an int representing
C pls
Assignment: Write the header file DateManager.h for a class DateManager with the following specifications:
Private Data Members:
year: an int representing the year.
month: an int representing the month.
day: an int representing the day.
Constructors:
A default constructor that initializes the date to January
A parameterized constructor that accepts three integers and uses them to set the year, month, and day, respectively.
Public Member Functions:
getYear: accepts no argument and returns the value of the year data member.
getMonth: accepts no argument and returns the value of the month data member.
getDay: accepts no argument and returns the value of the day data member.
setYear: accepts an integer to set the year data member and does not return anything.
setMonth: accepts an integer to set the month data member and does not return anything.
setDay: accepts an integer to set the day data member and does not return anything.
isLeapYear: accepts an integer representing a year and returns a boolean value to represent whether the year is a leap year.
displayDate: accepts no argument and prints the date as a string in the format YYYYMMDD
Avoid Multiple inclusions: Use the convention indicated in the book to prevent multiple inclusion errors.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
