Question
For the week 1 assessment, create a C++ program using Visual Studio that includes the class definition for a Date class that contains three integer
For the week 1 assessment, create a C++ program using Visual Studio that includes the class definition for a Date class that contains three integer data members: month, day, and year. Include a default constructor that assigns the date 1/1/2000 to any new object that does not receive arguments. Include another (overloaded) constructor that takes 3 arguments to initialize the Date object.
Also include a function that displays the Date object. Write a main() function in which you instantiate two Date objects: one that you create using the default constructor values, and one that you create using three arguments (month, day and year). Please include code to display these values.
Compile this application using Visual Studio and run it to make sure it is error free.
Please copy and paste your C++ code to a text file or you can upload 3 text files: __________.h, ___________.cpp, and___________.cpp (where the main() is).
This is for C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started