You must use a separate Date.h file for the Date class definition.

computer science

Description

b) Use overloaded constructors to create Date objects initialized with dates of the formats in part a).

You should only have 3 member data: integer month, integer day, and integer year. Also, you should have at least 2 constructors and 2 functions in your Date.cpp.


Problem Requirement
a) You must use a separate Date.h file for the Date class definition.
b) You must use a separate Date.cpp file for the Date class implementation.
c) You must use a separate TestDate.cpp file for the Testing program.
d) The Date class should contain only 3 member data: month, day, and year. They are all integer data.
e) Your program should run correctly with the same inputs and outputs as given in the sample run.
f) Your program must check for invalid inputs and also the leap year. Please see the example program on pages 416 to 417 for reference.

Instruction Files
Date.h
435.0 Bytes
Date.cpp
1.5 KB
Lab6.cpp
1.3 KB
Date.o
5.2 KB
Lab6.o
4.6 KB
Lab6.dev
767.0 Bytes

Related Questions in computer science category