C++课设通讯录管理系统(类与对象)

此代码为本人课设作业,小白一枚,还望大佬指正。

题目:通讯录管理系统

以本班同学的具体数据为背景,设计一个本班同学通讯录。

1. 设计要求:

(1)学生通讯录基本信息包括:学号、姓名、性别、年龄、电话号码、家庭地址、备注等。

(2)使用类和对象的概念实现程序设计。

(3)将学生通讯录基本信息保存到文件,所有操作都针对文件中的数据。

(4)程序算法说明清晰,理论分析与计算正确,运行情况良好,实验测试数据无误,容错性强(能对错误输入进行判断控制)。

(5)编程风格良好(包括缩进、空行、适当注释、变量名和函数名见名知意,程序容易阅读等)。

#include
#include
#include
#include
using namespace std;

#define MAXPEOPLE 100
static int scount=0;
class telephone
{
	char xuehao[20];//学号
	char xingming[20];//姓名
	char xingbie[20];//性别
	char nianling[20];//年龄
	char dianhua[20];//电话
	char zhuzhi[20];//住址
	char beizhu[20];//备注

public:
	telephone()
	{

	};
	void instial(char xh[20],char xm[20],char xb[2],char nl[20],char dh[20],char zz[200],char bz[20])
	{
		strcpy_s(xuehao,xh);
		strcpy_s(xingming,xm);
		strcpy_s(xingbie,xb);
		strcpy_s(nianling,nl);
		strcpy_s(dianhua,dh);
		strcpy_s(zhuzhi,zz);
		strcpy_s(beizhu,bz);
	};
	void setxuehao(char xh[20])
	{
		strcpy_s(xuehao,xh);
	}

	void setxingming(char xm[20])
	{
		str

你可能感兴趣的:(C++课设通讯录管理系统(类与对象))