Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help making this program using C++ heres the skeleton: #include #include #include //#include date.h using namespace std; //********************************************************************************************* //********************************************************************************************* // D A T

i need help making this program using C++
heres the skeleton:
#include  #include  #include  //#include "date.h" using namespace std; //********************************************************************************************* //********************************************************************************************* // D A T E . h //This declaration should go in date.h #ifndef DATE_H #define DATE_H class Date { public: Date(); //default constructor; sets m=01, d=01, y =0001 Date(unsigned m, unsigned d, unsigned y); //explicit-value constructor to set date equal to today's //date. Use 2-digits for month (m) and day (d), and 4-digits for year (y); this function should //print a message if a leap year. void display();//output Date object to the screen int getMonth();//accessor to output the month int getDay();//accessor to output the day int getYear();//accessor to output the year void setMonth(unsigned m);//mutator to change the month void setDay(unsigned d);//mutator to change the day void setYear(unsigned y);//mutation to change the year friend ostream& operator
image text in transcribed
image text in transcribed
image text in transcribed
Data Structure and Algorithm Analysis-COP3530 Program - Module 4 Total Points: 25 NO LATE ASSIGNMENTS WILL BE ACCEPTED!! In this assignment will demonstrate your understanding of the following: 1. Chclasses; 2. Implementing a class in CH: 3. Operator overloading with chaining: 4. Preprocessor directives #ifndef, #define, and #endif; 5. this - the pointer to the current object. In this assignment you will implement the Date class and test its functionality, Consider the following class declaration for the class date: class Date public: Date(); //default constructor sets 1-01, d-01, y eee1 Date(unsigned, unsigned d, unsigned y); //explicit-value constructor to set date equal to today's 1/date. Use 2-digits for month (m) and day (d), and 4-digits for year (y); this function should //print a message if a leap year. void display();//output Date object to the screen int getMonth();//accessor to output the month int getDay();//accessor to output the day int getYear();//accessor to output the year void setMonth(unsigned );//mutator to change the month void set Day (unsigned d); //mutator to change the day void set Year(unsigned y);//mutation to change the year friend ostream& operator

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions