Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

d_date.h ^ date_except.h ^ driver.cpp ^ a) Overload the relational operators (==, !=, ) to compare dates. Two dates are to be compared by chronology

image text in transcribed

d_date.h ^

image text in transcribed

date_except.h ^

image text in transcribed

driver.cpp ^

a) Overload the relational operators (==, !=, ) to compare dates. Two dates are to be compared by chronology of the year. For example: date(3,5,1999) != date(3,7,1999) (implement as external free function) date(3,5,1999) == date(3,5,1999) (implement as external free function) date(5,5,1977) > date(10,24,1973) (implement as member function) date(12,25,1944)

b) Write member function operator++ that can increment the date by one day.

c) Overload the input and output stream operators so that the date can be read/written as follows: date date1; cin >> date1 >> // read in as 12/25/1944 cout

Use the driver.cpp file which can be found on BlackBoard. You will also find an input file at this location to run with the driver.cpp file.

* : 1.2. wulan slir 15 1 .. .1.4 las Iru rer: pualle a Xerr a rrt us. Irt I. r: Klan": E N Irarr; werk. EX T V **: LAS IR... KLASI Elsas CEO : .. turet exstler Euter ricret at-iri 1-25, Irt: ret at-irani ENT; E 13 it ca la seb i -verir; wertli Ele Tur k ana wetian : rapor EVE T E and optimi Me t e te veroorker Alperesstre . // File: Driver.cpp // Note: Used to test our date class with overloaded functions #include #include "d_date.h" using namespace std; void main (void) date datel; date date2; cout > datel >> date2) cout date2) cout #include "d_date.h" using namespace std; void main (void) date datel; date date2; cout > datel >> date2) cout date2) cout

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

Students also viewed these Databases questions

Question

RP-3 What is evidence-based practice?

Answered: 1 week ago