文件名称:time-type
介绍说明--下载内容均来自于网络,请自行研究使用
定义如下时间类TimeType,要求完成各个成员函数,并写主函数进行验证。
class TimeType{
int h,m,s
public:
TimeType(int h0=0,m0=0,s0=0) //构造函数
void increSec(int sec) //增加若干秒
void increMin(int min) //增加若干分钟
void increHou(int hou) //增加若干小时
bool equal(TimeType t2) //判断两个时间是否相等
void printTime() //输出时间对象的时分秒
} -Defined as time classes TimeType, required to complete each member function and write the main function for authentication. class TimeType {int h, m, s public: TimeType (int h0 = 0, m0 = 0, s0 = 0) //Constructor void increSec (int sec) //add several seconds void increMin (int min) //increase the number of minutes void increHou (int hou) //add several hours bool equal (TimeType t2) //judge two times are equal void printTime () // output time object, hour}
class TimeType{
int h,m,s
public:
TimeType(int h0=0,m0=0,s0=0) //构造函数
void increSec(int sec) //增加若干秒
void increMin(int min) //增加若干分钟
void increHou(int hou) //增加若干小时
bool equal(TimeType t2) //判断两个时间是否相等
void printTime() //输出时间对象的时分秒
} -Defined as time classes TimeType, required to complete each member function and write the main function for authentication. class TimeType {int h, m, s public: TimeType (int h0 = 0, m0 = 0, s0 = 0) //Constructor void increSec (int sec) //add several seconds void increMin (int min) //increase the number of minutes void increHou (int hou) //add several hours bool equal (TimeType t2) //judge two times are equal void printTime () // output time object, hour}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
time type.cpp