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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!