通信录管理系统程序.docVIP

  • 4
  • 0
  • 约8.68千字
  • 约 11页
  • 2018-02-24 发布于河南
  • 举报
通信录管理系统程序

通信录管理系统 #includeiostream #includeiomanip //操作符的使用 #includefstream //输入、输出文件流类 #includestring class Studentrecord; using namespace std; const int MAX=57; //MAX最多人数 class Student //定义学生类 { private: string number; //学号 string name; //姓名 string address; //地址 string tele; //电话 string postal; //邮政 string Email; //邮箱 string QQ; //QQ public: friend Studentrecord; Student() // 无参构造函数 {} Student(string number,string name,string address,string tele,string postal,string Email,string QQ) // 有参构造函数 { this-number=number; this-name=name; this-address=address; this-tele=tele; this-postal=postal; this-Email=Email; this-QQ=QQ; } void print() { coutsetw(8)numbersetw(8)namesetw(8)addresssetw(8)telesetw(8)postal setw(8)Emailsetw(8)QQendl; } void setStudent(string number,string name,string address,string tele,string postal,string Email,string QQ)//设置对象值 { this-number=number; this-name=name; this-address=address; this-tele=tele; this-postal=postal; this-Email=Email; this-QQ=QQ; } void setNumber(string number) //设置学号 { this-number=number; } string getNumber() //获得学号 { return this-number; } void setName(string name)//设置姓名 { this-name=name; } string getName() //获得姓名 { return this-name; } void setAddress(string address) //设置地址 { this-address=address; } string getAddress() //获得地址 { return this-address; } void setTele(string tele) //设置电话 { this-tele=tele; } string getTele() //获得电话 { return this-tele; } void setPostal(string postal) //设置邮政 { this-postal; } string getPostal() //获得邮政 { return this-postal; } void setEmail(string Email) //设置E-mail { this-Email=Email; } string getEmail() //获得E-mail { return this-Email; } void setQQ(string QQ) //设置QQ { this-QQ=QQ; } string getQQ() //获得QQ { return this-QQ; } }; //学生定

文档评论(0)

1亿VIP精品文档

相关文档