欢迎来到天天文库
浏览记录
ID:35143685
大小:481.50 KB
页数:98页
时间:2019-03-20
《家谱系统源代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、家谱系统源代码计算机科学与技术04级(2)班蔡少伟200433100067//person.h//person类的声明//家庭成员的基本信息包括://姓名,出生地,出生日期,死亡日期,性别,身高,学历,职业,最高职务/职称,第几代...)//树在内存中的存储结构:孩子兄弟链,带父指示器;//家庭成员基本信息设置数字编号,用于唯一地标识记录;#ifndefPERSON#definePERSON#include#include#include#include2、am.h>#include"stringclass.h"structdetailday{intyear,month,day;friendistream&operator>>(istream&input,detailday&);friendostream&operator<<(ostream&output,detailday&);};classperson{private:intnum;//numberofthepersonintparentnum;//numberoffartherintspousenum;//numberof3、spouseintchildnum;//numberofthefirstchildintbrothernum;//numberofbrotherorsisternextintgeneration;Stringname;Stringbirthplace;Stringdegree;intdegreeclass;Stringjob;intjobkind;Stringposition;Stringsex;doubleheight;detaildaybirthday,deathday;intlifeyear;intx;inty;//po4、spublic:person*next;//thepointernextandprio,usedtolinkthechainperson*prio;person();person(int,int,int,int,int,int,char*,char*,char*,double,detailday,char*,int,char*,int,char*,detailday,int);intgetnum();intgetparentnum();intgetspousenum();intgetchildnum();intgetbroth5、ernum();intgetgeneration();Stringgetname();Stringgetsex();Stringgetbirthplace();Stringgetdegree();intgetdegreeclass();Stringgetjob();intgetjobkind();Stringgetposition();doublegetheight();detaildaygetbirthday();detaildaygetdeathday();intgetlifeyear();intgetx();intget6、y();voidsetnum(int);voidsetparentnum(int);voidsetspousenum(int);voidsetchildnum(int);voidsetbrothernum(int);voidsetgeneration(int);voidsetname(String);voidsetpos(int,int);voidpersoninput();//inputinformationofaspouseorapersonvoidchildinput();//inputinformationofachi7、ldvoiddeathinput();//inputdeathmembervoidwrite(ofstream&file);//writeinformationofapersontofilevoidchange();//changeinformationofthepersonvoiddelinformation();//deleteinformationofaperson,withtheinformationofpointersavedvoidinputdeathday();//inputthedeathdayandfigur8、eupthelifeyearvoidoutput();//outputinformationofthepersonvoidsimple_output();};#endif//person.cpp//person类的具体实现#include"person.h"//oprator
2、am.h>#include"stringclass.h"structdetailday{intyear,month,day;friendistream&operator>>(istream&input,detailday&);friendostream&operator<<(ostream&output,detailday&);};classperson{private:intnum;//numberofthepersonintparentnum;//numberoffartherintspousenum;//numberof
3、spouseintchildnum;//numberofthefirstchildintbrothernum;//numberofbrotherorsisternextintgeneration;Stringname;Stringbirthplace;Stringdegree;intdegreeclass;Stringjob;intjobkind;Stringposition;Stringsex;doubleheight;detaildaybirthday,deathday;intlifeyear;intx;inty;//po
4、spublic:person*next;//thepointernextandprio,usedtolinkthechainperson*prio;person();person(int,int,int,int,int,int,char*,char*,char*,double,detailday,char*,int,char*,int,char*,detailday,int);intgetnum();intgetparentnum();intgetspousenum();intgetchildnum();intgetbroth
5、ernum();intgetgeneration();Stringgetname();Stringgetsex();Stringgetbirthplace();Stringgetdegree();intgetdegreeclass();Stringgetjob();intgetjobkind();Stringgetposition();doublegetheight();detaildaygetbirthday();detaildaygetdeathday();intgetlifeyear();intgetx();intget
6、y();voidsetnum(int);voidsetparentnum(int);voidsetspousenum(int);voidsetchildnum(int);voidsetbrothernum(int);voidsetgeneration(int);voidsetname(String);voidsetpos(int,int);voidpersoninput();//inputinformationofaspouseorapersonvoidchildinput();//inputinformationofachi
7、ldvoiddeathinput();//inputdeathmembervoidwrite(ofstream&file);//writeinformationofapersontofilevoidchange();//changeinformationofthepersonvoiddelinformation();//deleteinformationofaperson,withtheinformationofpointersavedvoidinputdeathday();//inputthedeathdayandfigur
8、eupthelifeyearvoidoutput();//outputinformationofthepersonvoidsimple_output();};#endif//person.cpp//person类的具体实现#include"person.h"//oprator
此文档下载收益归作者所有