Question
Visual studio: c++ Design a program that uses a class called Date. The Date class should store a date in three integers: month, day, and
Visual studio: c++
Design a program that uses 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 following forms:
1/15/13
January 15, 2013
15 January 2013
The class: variables: month, year, day
string array to store the months names
constructors: default and Date(int, int, int)
functions:
setNames (to initialize the string array to the months names),
modifier functions for month, day, year
accessor functions for month, day, year
displayDate1, displayDate2, displayDate3
Input Validation: Do not accept values for the day greater than 31 or less than 1 (dont worry about different months here). Do not accept values for the month greater than 12 or less than 1.
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