Add a constructor to the Date class (using the versions of Chrono.cpp and Chrono.h found on our Piazza
page at Resources->Resources->Sample_Programs) that initializes the Date with format “month day
year” where month is type Month, day is type int, and year is type int. Be sure to check (in the
constructor) that a valid Date was entered. Create a program (hw3-pr2.cpp) that uses the Date class in
your modified Chrono.cpp to allow the user to enter a date using any of the three Date constructor
formats (year-month-day constructor, default-date contructor, and the month-day-year constructor you
added) and then print out the result (using the Date class << operator). Don’t forget to have a way for the
user to exit the program. And don’t forget to check for errors.
chrono.h- https://piazza-resources.s3.amazonaws.com/j4o77ldn…
chrono.cpp- https://piazza-resources.s3.amazonaws.com/j4o77ldn…
std_lib file- https://tamu.blackboard.com/bbcswebdav/pid-3499292…


0 comments