Question: Instructions Write a C++program that has a class for a date, that holds a month, day, and year, and can display it in American format

 Instructions Write a C++program that has a class for a date,

Instructions Write a C++program that has a class for a date, that holds a month, day, and year, and can display it in American format (mm/dd/yyyy), European format (dd/mm/yyyy), and the ISO 8601 standard format (yyyy-mm-dd) 1. Create a class called "Date" with the following private data members . month year 2. Create the following public methods (functions) set - Accepts a month, day, and year, and sets the member variables displayAmerican-Displays the date in the format: mm/dd/yyyy displayEuropean - Displays the date in the format: dd/mm/yyyy displayISO - Displays the date in the format: yyyy-mm-dd 3. You will have the following files: date.h- Used for the declaration of your Date class date.cpp - Used for the method bodies check04b.cpp - Contains the main function. makefile - This will be used by the autograding system to process your files. Make sure to update it with your name and teacher, etc. 4. Have main 1. Prompt the user for a month, day, and year 2. Create a Date object. 3. Call the set method on your object, passing in the month, day, and year 4. Call the disp layAmerican, displayEuropean, and displayISO methods on your object. 5. You need not worry about formatting single digit months or days to have two digits, or anything of that nature Sample Output The following is an example of output for this program Month: 10 Day: 13 Year: 2007 10/13/2007 13/10/2007 2007-10-13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!