第三章作业
文章平均质量分 61
caita_
新手学编程酱菜141
展开
-
第二题
#include using namespace std; class Date {public: Date(int,int,int); Date(int,int); Date(int); Date(); void display(); private: int month; int day; int year;原创 2015-04-19 22:46:07 · 210 阅读 · 0 评论 -
第三章第10
#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-20 12:39:45 · 270 阅读 · 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-19 23:51:35 · 220 阅读 · 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<<num<<" "<<score<<endl;}原创 2015-04-19 23:42:20 · 250 阅读 · 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<<num<<" "<<score<<endl;}原创 2015-04-19 23:29:50 · 242 阅读 · 0 评论 -
第三章第8题
#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<<num<<" "<<score<<endl;}原创 2015-04-19 23:44:47 · 397 阅读 · 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<<num<<" "<<原创 2015-04-19 23:27:15 · 285 阅读 · 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() const {cout<<num<<" "<<score<<原创 2015-04-19 23:24:51 · 284 阅读 · 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<<num<<" "<<score<<endl;}原创 2015-04-19 23:15:30 · 261 阅读 · 0 评论 -
第三章5 找出5个学生中成绩最高者
#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(1,78.5),Student(原创 2015-04-19 23:11:18 · 471 阅读 · 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() {c原创 2015-04-19 22:54:54 · 326 阅读 · 0 评论 -
第三题改用默认参数
#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 d,int y):原创 2015-04-19 22:50:13 · 331 阅读 · 0 评论 -
类的知识点的归纳绘图
原创 2015-04-20 16:09:01 · 290 阅读 · 0 评论