面向对象程序设计期末考试(8)
发布时间:2021-06-07
发布时间:2021-06-07
面向对象程序设计期末考试
static int totalweight;
public:
Goods(char *str,int w){
strcpy(gd_name,str);
weight=w;
totalweight+=weight;
}
~Goods(){totalweight-=weight;}
char * GetN(){ ⑴ ;}
int GetW(){return weight;}
static int GetTotal_weight(){
⑵ ;
}
};
⑴cout<<gd_name<<endl ⑵return totalweight
上一篇:08年山东高考英语试题