![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
第三章
Aseela
这个作者很懒,什么都没留下…
展开
-
第三题
第三题源代码#include using namespace std;class Date {public: Date(int=1,int=1,int=2005); void display(); private: int month; int day; int year; };Date::Date(int m,int原创 2015-04-27 17:57:16 · 136 阅读 · 0 评论 -
第五题
#include using namespace std;class Student {public: Student(int n,float s):num(n),score(s){} int num; float score; };void main(){Student stud[5]={ Student(101,78),Studen原创 2015-04-27 18:01:36 · 221 阅读 · 0 评论 -
第九题
#include using namespace std;class Product {public: Product(int n,int q,float p):num(n),quantity(q),price(p){}; void total(); static float average(); static void display();原创 2015-04-27 21:29:28 · 159 阅读 · 0 评论 -
第十二题
#include using namespace std;templateclass Compare {public: Compare(numtype a,numtype b); numtype max(); numtype min(); private: numtype x,y; };template Compare::Compa原创 2015-04-27 21:37:16 · 174 阅读 · 0 评论 -
第四题
#include using namespace std;class Student {public: Student(int n,float s):num(n),score(s){} void display(); private: int num; float score; };void Student::display()原创 2015-04-27 17:58:46 · 100 阅读 · 0 评论 -
第七题
#include using namespace std;class Student {public: Student(int n,float s):num(n),score(s){} void change(int n,float s) const {num=n;score=s;} void display() const {cout private:原创 2015-04-27 21:25:59 · 152 阅读 · 0 评论 -
第八题
#include using namespace std;class Student {public: Student(int n,float s):num(n),score(s){} void change(int n,float s) {num=n;score=s;} void display() {cout private: int num;原创 2015-04-27 21:27:50 · 176 阅读 · 0 评论 -
第十题
#include using namespace std;class Date;class Time {public: Time(int,int,int); friend void display(const Date &,const Time &); private: int hour; int minute; int sec;原创 2015-04-27 21:32:06 · 146 阅读 · 0 评论 -
第十一题
#include using namespace std;class Time;class Date {public: Date(int,int,int); friend Time;private: int month; int day; int year; };Date::Date(int m,int d,int y):原创 2015-04-27 21:35:31 · 173 阅读 · 0 评论