Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***** C++ programming language ***** PLEASE segregate the main.cpp , date.h and date.cpp code - Itll help me understand what is needed for each file

***** C++ programming language ***** PLEASE segregate the main.cpp , date.h and date.cpp code - Itll help me understand what is needed for each file :)
image text in transcribed
Write a program that allows us to create a Date object, display it and check if it is a leap year 1. Constructor takes 3 integer parameters corresponding to day, month and year 2. getDay, getMonth, and getYear class functions return the corresponding value of the date object 3. display prints the date object as "1-January-1900 4. setDay, setMonth, setYear class functions set the corresponding value 5. isLeapYear returns true if the date is a leap year, false otherwise. A year is a leap year if it is evenly divisible by 4. BUT, if the year can be evenly divided by 100, it is NOT a leap year, unless it is also evenly divisible by 400. Then it is a leap year daysInMonth returns the maximum number of days in that month. January has 31 days, February 28 or 29, March has 31, etc 6. A sample testDate function and its output is provided below to help you design and test your date class. You should write additional test function to test your program. You can assume the input is valid (i.e. day, month and year in the correct range). void teatbate 0 Date di804(2, 2, 1804) Date d1 80510, 2, 1805); Date d1900 (20,7, 1900) Date d2000 (20,7, 2000) 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

Recommended Textbook for

More Books

Students also viewed these Databases questions