Question: In a Visual Studio C++ project named using the format firstname_lastname_0301 CSCdate class Create the CSCdate class (CSCdate.h and CSCdate.cpp) CSCdate -day: int -month: int




In a Visual Studio C++ project named using the format firstname_lastname_0301 CSCdate class Create the CSCdate class (CSCdate.h and CSCdate.cpp) CSCdate -day: int -month: int -year: int +setDay(int d): void +getDay() const: int +set Month(int m): void +getMonth() const: int +getMonthName() const: string CSCdate -day: int -month: int -year: int +setDay (int d): void +getDay() const: int +set Month(int m): void +getMonth() const: int +getMonthName() const: string +setYear(int y): void +getYear() const: int CSCdate(int d=1, int m=1, int y=1800) The constructor receives the day, month, and year as input. det Dav detMonth and getYear are accessors The constructor receives the day, month, and year as input. getDay, getMonth, and getYear are accessors that returns the value of the respective variable. get MonthName returns the corresponding name of the month value. setDay, setMonth, and set Year are mutators that change the value of the respective variable. Business rules Day can only be between 1 and 31. If setDay receives an invalid value, it does not change the day value. Month can only be between 1 and 12. If setMonth receives an invalid value, it does not change the month value. Year can only be between 1800 and 2022. If setYear receives an invalid value, it does not change the year value. If the constructor receives an invalid value in day, month, or year; change the corresponding variable to the default values: 1, 1, 1800, Note: Due to time limitation, this class does not verify if a full date is valid e.g. February 30, April 31, etc. In the main function Create an object of CSCdate class. Use the no- argument constructor. Display the date using the accessors getDay, get Month, and getYear. Modify the object's day, month, and year. Display the date using the accessors getDay, getMonth, and getYear. Create another CSCdate object using a valid date in the constructor. Display the date using the accessors getDay, get MonthName, and getYear. Submission Expected files: VS Solution and project -related files. main file (.cpp). Display the date using the accessors getDay, get Month, and getYear. Create another CSCdate object using a valid date in the constructor. Display the date using the accessors getDay, get MonthName, and getYear. Submission Expected files: VS Solution and project -related files. main file (.cpp). CSCdate.h and CSCdate.cpp Submit the VS project with your solution in a ZIP file. Example of expected output CSCdate app! First CsCdate: 1-1-1800 Updated first CSCdate: 21-4-2005 Second CSCdate: 18-June-2021
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
