Question
Write the definitions of the functions to implement the operations defined for the class dateTypein Programming Exercise 6 . You may write a main.cpp to
Write the definitions of the functions to implement the operations defined for the class dateTypein Programming Exercise 6.
You may write a main.cpp to test your class dateType. You will only be graded on the contents of thedateType class.
Please write in C++ and specify what changes need to be made in dateType.h if any AND what dateTypelmp.cpp will be. Thank you! Here is the copyable dateType.h given in the problem.
dateType.h:
#ifndef dateType_H
#define dateType_H
class dateType
{
public:
void setDate(int, int, int);
void setMonth(int);
void setDay(int);
void setYear(int);
void print() const;
int numberOfDaysPassed();
int numberOfDaysLeft();
void incrementDate(int nDays);
int getMonth() const;
int getDay() const;
int getYear() const;
int getDaysInMonth();
bool isLeapYear();
dateType(int = 1, int = 1, int = 1900);
private:
int dMonth;
int dDay;
int dYear;
};
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