文件名称:exp3
-
所属分类:
- 标签属性:
- 上传时间:2013-09-25
-
文件大小:1.23mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
理解和掌握运算符重载,了解静态变量和const成员函数。
实验内容:
(1)设计一个名为Date的日期类,完成基本的日期处理功能。
(2)扩充实例编程中的日期类,为Date类增加一个成员函数,可以判断一个日期是否是系统的当前日期。从键盘输入你的生日,如果今天是你的生日则显示“HappyBirthday!”,否则显示“还有XX天是你的生日”或“你的生日已经过去了XX天,明年的生日要再等YY天”。
(3)仿照Date类设计一个Time类,设计多个重载的构造函数,可以设置时间、进行时间的加减运算、按各种可能的格式输出时间。-Understand and master operator overloading, understanding static const member variables and functions. Experiment: (a) Design a class named Date date, the completion date of the basic processing functions. (2) extend the date in the class examples of programming for the Date class adds a member function, you can determine whether a date is the system' s current date. From the keyboard to enter your birthday, if today is your birthday is displayed " HappyBirthday!" , Otherwise " there is your birthday XX days" or " your birthday has passed after XX days next year' s birthday have to wait YY days. " (3) Design a class modeled Date Time class, designing several overloaded constructors, you can set the time for time of addition and subtraction, according to a variety of possible formats output time.
实验内容:
(1)设计一个名为Date的日期类,完成基本的日期处理功能。
(2)扩充实例编程中的日期类,为Date类增加一个成员函数,可以判断一个日期是否是系统的当前日期。从键盘输入你的生日,如果今天是你的生日则显示“HappyBirthday!”,否则显示“还有XX天是你的生日”或“你的生日已经过去了XX天,明年的生日要再等YY天”。
(3)仿照Date类设计一个Time类,设计多个重载的构造函数,可以设置时间、进行时间的加减运算、按各种可能的格式输出时间。-Understand and master operator overloading, understanding static const member variables and functions. Experiment: (a) Design a class named Date date, the completion date of the basic processing functions. (2) extend the date in the class examples of programming for the Date class adds a member function, you can determine whether a date is the system' s current date. From the keyboard to enter your birthday, if today is your birthday is displayed " HappyBirthday!" , Otherwise " there is your birthday XX days" or " your birthday has passed after XX days next year' s birthday have to wait YY days. " (3) Design a class modeled Date Time class, designing several overloaded constructors, you can set the time for time of addition and subtraction, according to a variety of possible formats output time.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
exp3/
exp3/3.dsp
exp3/3.dsw
exp3/3.ncb
exp3/3.opt
exp3/3.plg
exp3/Date.cpp
exp3/Date.h
exp3/Debug/
exp3/Debug/3.exe
exp3/Debug/3.ilk
exp3/Debug/3.pch
exp3/Debug/3.pdb
exp3/Debug/Date.obj
exp3/Debug/main.obj
exp3/Debug/Time.obj
exp3/Debug/vc60.idb
exp3/Debug/vc60.pdb
exp3/main.cpp
exp3/Time.cpp
exp3/Time.h
exp3/3.dsp
exp3/3.dsw
exp3/3.ncb
exp3/3.opt
exp3/3.plg
exp3/Date.cpp
exp3/Date.h
exp3/Debug/
exp3/Debug/3.exe
exp3/Debug/3.ilk
exp3/Debug/3.pch
exp3/Debug/3.pdb
exp3/Debug/Date.obj
exp3/Debug/main.obj
exp3/Debug/Time.obj
exp3/Debug/vc60.idb
exp3/Debug/vc60.pdb
exp3/main.cpp
exp3/Time.cpp
exp3/Time.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.