1613-3-傅溥衍 总结《2016年11月19日》【连续第五十天总结】
2016-11-20 00:24
155 查看
标题:继承
关键词:人类设计
内容:
A今日完成情况
1. 人类设计50%
B具体内容
人类设计
#include<iostream>
#include<windows.h>
#include<string.h>
using namespace std;
class person
{
char *name;
char sex;
char pid[19];
int weight;
int high;
public:
person();
person(char *n,char s,char *p,int w,int h);
void change_data(char *n,char s,char *p,int w,int h);
void walking(int k,int v);
void hearing(char *sentence);
void speek(int n);
void writing();
void print();
void out(int a);
~person();
};
void person::walking(int k,int v)
{
cout<<"\n"<<name<<"水平直线行走"<<k<<"步"<<endl;
for(int i=0;i<k;i++)
{
cout<<' '<<"o _ o";
Sleep(1000/v);
cout<<"\b\b\b";
}
}
void person::hearing(char *sentence)
{
cout<<endl<<sentence<<endl;
char *p=new char[strlen(sentence)+1];
strcpy(p,sentence);
char *pp=p;
while(*p)
{
if(*p>='a'&& *p<='z')
*p='A'+(*p-'a'+0);
else if(*p>='A'&& *p<='Z')
*p='a'+(*p-'A');
p++;
}
cout<<pp<<endl;
delete pp;
}
void person::speek(int n)
{
if(n>1999999999)
cout<<"devc++无法处理"<<endl;
else
{
int a=n/1000000000,b=(n%1000000000)/1000000;
int c=(n%1000000)/1000,d=n%1000;
if(a!=0)
{ out(a);
cout<<"billion";
}
if(b!=0)
{ out(b);
cout<<"million";
}
if(c!=0)
{ out(c);
cout<<"thousand";
}
if(d!=0)
{
if(d<100&&(a!=0||b!=0||c!=0))
cout<<"and";
}
cout<<endl;
}
}
void person::writing()
{
cout<<"啊啊啊啊啊"<<endl;
}
int main()
{
person Jack("James Chen",'M',"5923666658147520258",160,180);
Jack.print();
Jack.walking(20,4);
Jack.hearing("Hi! you are silly");
Jack.speek(1006);
cout<<endl;
Jack.writing();
return 0;
}
C明日计划
A 人类设计
B 为什么需要继承
关键词:人类设计
内容:
A今日完成情况
1. 人类设计50%
B具体内容
人类设计
#include<iostream>
#include<windows.h>
#include<string.h>
using namespace std;
class person
{
char *name;
char sex;
char pid[19];
int weight;
int high;
public:
person();
person(char *n,char s,char *p,int w,int h);
void change_data(char *n,char s,char *p,int w,int h);
void walking(int k,int v);
void hearing(char *sentence);
void speek(int n);
void writing();
void print();
void out(int a);
~person();
};
void person::walking(int k,int v)
{
cout<<"\n"<<name<<"水平直线行走"<<k<<"步"<<endl;
for(int i=0;i<k;i++)
{
cout<<' '<<"o _ o";
Sleep(1000/v);
cout<<"\b\b\b";
}
}
void person::hearing(char *sentence)
{
cout<<endl<<sentence<<endl;
char *p=new char[strlen(sentence)+1];
strcpy(p,sentence);
char *pp=p;
while(*p)
{
if(*p>='a'&& *p<='z')
*p='A'+(*p-'a'+0);
else if(*p>='A'&& *p<='Z')
*p='a'+(*p-'A');
p++;
}
cout<<pp<<endl;
delete pp;
}
void person::speek(int n)
{
if(n>1999999999)
cout<<"devc++无法处理"<<endl;
else
{
int a=n/1000000000,b=(n%1000000000)/1000000;
int c=(n%1000000)/1000,d=n%1000;
if(a!=0)
{ out(a);
cout<<"billion";
}
if(b!=0)
{ out(b);
cout<<"million";
}
if(c!=0)
{ out(c);
cout<<"thousand";
}
if(d!=0)
{
if(d<100&&(a!=0||b!=0||c!=0))
cout<<"and";
}
cout<<endl;
}
}
void person::writing()
{
cout<<"啊啊啊啊啊"<<endl;
}
int main()
{
person Jack("James Chen",'M',"5923666658147520258",160,180);
Jack.print();
Jack.walking(20,4);
Jack.hearing("Hi! you are silly");
Jack.speek(1006);
cout<<endl;
Jack.writing();
return 0;
}
C明日计划
A 人类设计
B 为什么需要继承
相关文章推荐
- 1613-3-傅溥衍 总结《2016年10月5日》【连续第五天总结】
- 1613-3-傅溥衍 总结《2016年10月8日》【连续第八天总结】
- 1613-3-傅溥衍 总结《2016年10月27日》【连续第二十七天总结】
- 1613-3-傅溥衍 总结《2016年11月2日》【连续三十三天总结】
- 1613-3-傅溥衍 总结《2016年10月3日》【连续第三天总结】
- 1613-3-傅溥衍 总结《2016年11月6日》【连续三十七天总结】
- 1613-3-傅溥衍 总结《2016年10月24日》【连续第二十四天总结】
- 1613-3-傅溥衍 总结《2016年10月23日》【连续第二十三天总结】
- 1613-3-傅溥衍 总结《2016年11月4日》【连续三十五天总结】
- 1613-3-傅溥衍 总结《2016年10月9日》【连续第九天总结】
- 1613-3-傅溥衍 总结《2016年10月15日》【连续第十五天总结】
- 1613-3-傅溥衍 总结《2016年10月14日》【连续第十四天总结】
- 1613-3-傅溥衍 总结《2016年10月25日》【连续第二十五天总结】
- 1613-3-傅溥衍 总结《2016年10月21日》【连续第二十一天总结】
- 1613-3-傅溥衍 总结《2016年10月7日》【连续第七天总结】
- 1613-3-傅溥衍 总结《2016年10月12日》【连续第十二天总结】
- 1613-3-傅溥衍 总结《2016年10月17日》【连续第十七天总结】
- 1613-3-傅溥衍 总结《2016年10月29日》【连续第二十九天总结】
- 1613-3-傅溥衍 总结《2016年11月5日》【连续三十六天总结】
- 1613-3-傅溥衍 总结《2016年10月2日》【连续第二天总结】