Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could you please help solving this question using C++ language 1. Complete the implementation of the class date that represents dates written in the form

image text in transcribedimage text in transcribedCould you please help solving this question using C++ language

1. Complete the implementation of the class date that represents dates written in the form day/month/year. Do not modify the main program. You must write the prototypes and the definitions of the methods of the class. It is not necessary to use "getter" and "setter" methods. Declaration of Class Date /* File: date.h A class representing dates in the form: day, month and year dates are written to a stream in the form day/month/year day-number() returns the number of days since 1/1 of the current year including the current day days-between() returns the number of days between two dates not including the first day but including the last day. */ #ifndef DATE H #define DATEH #include #include using namespace std; class date { private : int day : int month; int year; public: // you fill in the method prototypes #endif /* DATEH */ Implementation of Class Date /* File : date.cpp Implementation of class date +/ #include "date.h" #include // number of days in each month const int DAYS [12] = {31,28,31,30,31,30,31,31,30,31,30,31}; IIIIIIIIIIIIIIIIIIIIIIII/ Methods of date //// // Main Program Using Class Date /* File: test date.cpp Application program using class time Programmer: your name Date: #include "date.h" int main(void) ofstream fout ("date.txt" ); date d(12, 6, 2016); date e (14, 9, 2018): fout

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_2

Step: 3

blur-text-image_3

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions