Question: CECS 282-05- Spring 2018 C++ for Java Programmers Program 2 - ADT (Date Object) Due: Feb 27, 2018 Create a C++ class called myDate. It

 CECS 282-05- Spring 2018 C++ for Java Programmers Program 2 -
ADT (Date Object) Due: Feb 27, 2018 Create a C++ class called
myDate. It should have the following operations: myDate0-default constructor. This will set

CECS 282-05- Spring 2018 C++ for Java Programmers Program 2 - ADT (Date Object) Due: Feb 27, 2018 Create a C++ class called myDate. It should have the following operations: myDate0-default constructor. This will set the date to May 11, 1959 myDate(int M, int D, int Y)-overloaded constructor. This will set the date to the values passed in through the parameter list represented by Month, Day and Year. e void display)- display the date in the following format (May 11, 1959) Do NOT print a linefeed after the date. void increaseDate(int N)-increment the date by N days void decrease Date(int N)-decrement the date by N days redno auwe.. int daysBetween(myDate D)-return the number of days between this date and the date Elosulstracon D. If date D is a future date, the return value will be a positive int. If date D is in the past, the return value will be a negative int. int getMonth0 - return the month in integer form int getDay0-return the day of the month int getYear0- returm the year int dayonear()-return the number of dayssince the current year began. EsampleJan i s 1, Feb 1 is 32ie luwel string dayName)- returns Monday, Tuesday, etc according to the day of the week. x starhiy Write a driver program that tests each operation. I will provide a test program to you before due date So Note: You can never have a date that is invalid. The only opportunity for this to happen will be with the overloaded constructor. Therefore if any invalid data is passed to this constructor, ignore all I have included an explanation of Julian dates. You can make your life much easler by using this You will need to use "pass by reference" for some of the functions in the Julian date converter. data and set the values to the default date formula. The example code is written in FORTRAN 2 functions that are NOTsl fo myDatecppfile Here are the prototypes for these 2 functions GregaJulian(int month, int day, int year): // pass in the Month, Day, Year and return Julian number t JD, int &month, int & day, int & year):// pass in the ean Date and at te Da eer pby don't to putor reference

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!