From 54c4b0781784bb64a9cb2dee9e5e8c9034a9f1d1 Mon Sep 17 00:00:00 2001 From: 201816040230 <56499333+201816040230@users.noreply.github.com> Date: Thu, 31 Oct 2019 23:13:41 +0800 Subject: [PATCH] Create Date.h This is my assignment_03 Student ID: 201816040230 --- 201816040230/Ex03_15/Date.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 201816040230/Ex03_15/Date.h diff --git a/201816040230/Ex03_15/Date.h b/201816040230/Ex03_15/Date.h new file mode 100644 index 0000000..bc2d20f --- /dev/null +++ b/201816040230/Ex03_15/Date.h @@ -0,0 +1,18 @@ + +using namespace std; +class Date +{ +public: + Date(int,int,int);//定义构造函数 + void setMonth(int);//月的set函数 + int getMonth();//月的get函数 + void setDay(int);//日的set函数 + int getDay();//日的get函数 + void setYear(int);//年的set函数 + int getYear();//年的get函数 + void displayDate();//输出数据 +private: + int month; + int day; + int year; +};