Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Date Class C++ Programming Date.h and testDate.cpp Design a class called Date. The Date class should store a date in three integers: month, day, and

Date Class C++ Programming image text in transcribed
Date.h and testDate.cpp Design a class called Date. The Date class should store a date in three integers: month, day, and year. There should be member functions to print the date in the different forms supported by the member methods. Here is the set of testing that you should include in the main application: // using the overloaded constructor. Date today (12, 25, 2012); // Show the date in form #1. today.showDatel(); // Store a new month, day, and year // in the object. today.setMonth(8); today.setDay (16); today.set Year (2012); // Show the date in form #2. today.showDate2(); // Show the date in form #3. today.showDate3 ; // Test invalid date. Date someday (12, 32, 2012); Demonstrate the class by writing a complete program implementing it. Input Validation: Do not accept values for the day greater than 31 or less than 1. Do not accept values for the month greater than 12 or less than 1. Test Run - 0 X C:\Users\tony Downloads\Week01\appDate.exe 12/25/2012 August 16, 2012 16 August 2012 32 is not a valid value for the day. Process returned i (@xi) execution tine : 0.185 s Press any key to continue Submit Date.h testDate.cpp Validation test run result

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 Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

Students also viewed these Databases questions