文件名称:test
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个date类如下:
class Date
{
public:
void SetDate(int y,int m,int d)
void IsLeapYear()
private:
int year
int month
int day
}
要求:
(1)编写SetDate(int y,int m,int d)函数,实现对象中数据成员的设置;
(2)编写IsLeapYear()判断该年是否是闰年。 -Define a date class as follows: class Date (public: void SetDate (int y, int m, int d) void IsLeapYear () private: int year int month int day ) requirements: (1) preparation SetDate ( int y, int m, int d) function, to achieve the object set of data members (2) the preparation of IsLeapYear () determine whether the year is a leap year.
class Date
{
public:
void SetDate(int y,int m,int d)
void IsLeapYear()
private:
int year
int month
int day
}
要求:
(1)编写SetDate(int y,int m,int d)函数,实现对象中数据成员的设置;
(2)编写IsLeapYear()判断该年是否是闰年。 -Define a date class as follows: class Date (public: void SetDate (int y, int m, int d) void IsLeapYear () private: int year int month int day ) requirements: (1) preparation SetDate ( int y, int m, int d) function, to achieve the object set of data members (2) the preparation of IsLeapYear () determine whether the year is a leap year.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
新建文件夹\1.cpp
新建文件夹
新建文件夹