题目描述

Create a class called Date that includes three pieces of information as data members—a month (type int), a day (type int) and a year (type int).
Your class should have a constructor with three parameters that uses the parameters to initialize the three data members.
For the purpose of this exercise, assume that the values provided for the year and day are correct, but ensure that the month value is in the range 1–12; if it isn’t, set the month to 1.
Provide a set and a get function for each data member.
Provide a member function displayDate that displays the month, day and year separated by forward slashes (/).


输入格式

The first line contains the day, month, year.
The second line contains the new day, new month, new year.


输出格式

The main function have been given, please implement the Date class.


样例数据

输入

1 5 1979
2 19 1879

输出

Month: 5
Day: 1
Year: 1979
5/1/1979
1/2/1879

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解