旅游电子商务网站建设规划书,自己做网站做什么内容,网站开发图片存哪里,是否有可能一个人完成网站开发系列文章
任务19 简单个人电话号码查询系统
问题描述 人们在日常生活中经常需要查找某个人或某个单位的电话号码#xff0c;本实验将实现一个简单的个人电话号码查询系统#xff0c;根据用户输入的信息#xff08;例如姓名等#xff09;进行快速查询。基本要求 (1) 在外存…系列文章
任务19 简单个人电话号码查询系统
问题描述 人们在日常生活中经常需要查找某个人或某个单位的电话号码本实验将实现一个简单的个人电话号码查询系统根据用户输入的信息例如姓名等进行快速查询。基本要求 (1) 在外存上用文件保存电话号码信息 (2) 在内存中设计数据结构存储电话号码信息 (3) 提供查询功能根据姓名实现快速查询 (4) 提供其他维护功能例如插入、删除、修改等 (5) 按电话号码进行排序。 文章目录 系列文章一、实践目的与要求1、目的2、要求 二、课题任务三、总体设计1.存储结构及数据类型定义2.程序结构3.所实现的功能函数 四、小组成员及分工五、 测试文件读取添加联系人删除联系人修改联系人查询联系人退出 六、源代码获取 一、实践目的与要求
1、目的
通过此次实践环节主要达到以下目的 1进一步理解和运用结构化程序设计的思想和方法学会根据具体问题选择合理的计算机存储结构实现数据的存储构造较有效率的算法 2学会算法描述的方法并编制具有结构清晰、合理和易读性的小型实用程序 3并会设计测试方案完成程序的测试能撰写出该程序的技术报告为文档整理工作打下一个初步的基础 4培养小组成员间互相学习取长补短协同工作的能力。
2、要求
1模块化程序设计锯齿型书写格式代码要有足够的注释 2根据课题中规定的要求实现既定目标 3撰写格式排版规范、结构完整的技术文档。
二、课题任务
题目、内容及主要功能描述
简单个人电话号码查询系统
问题描述 人们在日常生活中经常需要查找某个人或某个单位的电话号码本实验将实现一个简单的个人电话号码查询系统根据用户输入的信息例如姓名等进行快速查询。基本要求 (1) 在外存上用文件保存电话号码信息 (2) 在内存中设计数据结构存储电话号码信息 (3) 提供查询功能根据姓名实现快速查询 (4) 提供其他维护功能例如插入、删除、修改等 (5) 按电话号码进行排序。
三、总体设计
1.存储结构及数据类型定义
采用了什么存储结构、被处理数据定义的数据类型数据类型定义中要有注释说明
typedef struct {char name[50];char phoneNumber[20];
} Contact;
2.程序结构
程序整体的模块结构图
3.所实现的功能函数
每个功能对应的函数名、函数形参及返回值说明
void addContact(Contact* contacts, int* count, const char* name, const char* phoneNumber)// 添加联系人 函数名addContact 函数形参Contact* contacts, int* count, const char* name, const char* phoneNumber 函数返回值void
void deleteContact(Contact* contacts, int* count, const char* name) // 删除联系人 函数名deleteContact 函数形参Contact* contacts, int* count, const char* name 函数返回值void
void updateContact(Contact* contacts, int count, const char* name, const char* newPhoneNumber) // 修改联系人 函数名updateContact 函数形参Contact* contacts, int count, const char* name, const char* newPhoneNumber 函数返回值void
const char* findContact(const Contact* contacts, int count, const char* name)// 查询联系人 函数名findContact 函数形参const Contact* contacts, int count, const char* name 函数返回值const char*
void saveContactsToFile(const Contact* contacts, int count, const char* filename) // 保存联系人到文件 函数名saveContactsToFile 函数形参const Contact* contacts, int count, const char* filename 函数返回值void
int loadContactsFromFile(Contact* contacts, const char* filename) // 从文件中加载联系人 函数名loadContactsFromFile 函数形参Contact* contacts, const char* filename 函数返回值int
int comparePhoneNumbers(const void* a, const void* b) //用于比较两个联系人的电话号码 函数名comparePhoneNumbers 函数形参const void* a, const void* b 函数返回值int
void sortContactsByPhoneNumber(Contact* contacts, int count) 函数名
sortContactsByPhoneNumber 函数形参 Contact* contacts, int count 函数返回值void
int main(); 函数名main 函数形参无 函数返回值int 四、小组成员及分工
组长、组员及每人承担的具体模块任务或其他 组长
void addContact(Contact* contacts, int* count, const char* name, const char* phoneNumber)// 添加联系人 函数名addContact 函数形参Contact* contacts, int* count, const char* name, const char* phoneNumber 函数返回值void
void deleteContact(Contact* contacts, int* count, const char* name) // 删除联系人 函数名deleteContact 函数形参Contact* contacts, int* count, const char* name 函数返回值void
void updateContact(Contact* contacts, int count, const char* name, const char* newPhoneNumber) // 修改联系人 函数名updateContact 函数形参Contact* contacts, int count, const char* name, const char* newPhoneNumber 函数返回值void 组员1
const char* findContact(const Contact* contacts, int count, const char* name)// 查询联系人 函数名findContact 函数形参const Contact* contacts, int count, const char* name 函数返回值const char*
void saveContactsToFile(const Contact* contacts, int count, const char* filename) // 保存联系人到文件 函数名saveContactsToFile 函数形参const Contact* contacts, int count, const char* filename 函数返回值void
int loadContactsFromFile(Contact* contacts, const char* filename) // 从文件中加载联系人 函数名loadContactsFromFile 函数形参Contact* contacts, const char* filename 函数返回值int组员2
int comparePhoneNumbers(const void* a, const void* b) //用于比较两个联系人的电话号码 函数名comparePhoneNumbers 函数形参const void* a, const void* b 函数返回值int
void sortContactsByPhoneNumber(Contact* contacts, int count) 函数名
sortContactsByPhoneNumber 函数形参 Contact* contacts, int count 函数返回值void
int main(); 函数名main 函数形参无 函数返回值int 五、 测试
整合各功能模块后的测试结果截图及说明
文件读取 添加联系人 删除联系人 修改联系人 查询联系人 退出 针对于文件的读写以及数据的排序工作在添加、删除和修改联系人后调用排序功能每步都保存在文件中。
六、源代码获取
本次的分享就到这里啦创作不易感谢点赞收藏 感兴趣的小伙伴可以在评论区留言或者私信我哦
提示代码获取链接 下载源码 文章转载自: http://www.morning.myfwb.cn.gov.cn.myfwb.cn http://www.morning.kxqwg.cn.gov.cn.kxqwg.cn http://www.morning.qnbsx.cn.gov.cn.qnbsx.cn http://www.morning.ckxd.cn.gov.cn.ckxd.cn http://www.morning.ssjee.cn.gov.cn.ssjee.cn http://www.morning.paoers.com.gov.cn.paoers.com http://www.morning.wbxbj.cn.gov.cn.wbxbj.cn http://www.morning.xltwg.cn.gov.cn.xltwg.cn http://www.morning.srbl.cn.gov.cn.srbl.cn http://www.morning.sjsks.cn.gov.cn.sjsks.cn http://www.morning.qjsxf.cn.gov.cn.qjsxf.cn http://www.morning.rwpjq.cn.gov.cn.rwpjq.cn http://www.morning.mtktn.cn.gov.cn.mtktn.cn http://www.morning.gmysq.cn.gov.cn.gmysq.cn http://www.morning.ypjjh.cn.gov.cn.ypjjh.cn http://www.morning.mbmtz.cn.gov.cn.mbmtz.cn http://www.morning.yqhdy.cn.gov.cn.yqhdy.cn http://www.morning.rqrh.cn.gov.cn.rqrh.cn http://www.morning.gxfpk.cn.gov.cn.gxfpk.cn http://www.morning.lgxzj.cn.gov.cn.lgxzj.cn http://www.morning.xmttd.cn.gov.cn.xmttd.cn http://www.morning.gjmbk.cn.gov.cn.gjmbk.cn http://www.morning.kbyp.cn.gov.cn.kbyp.cn http://www.morning.rgkd.cn.gov.cn.rgkd.cn http://www.morning.jfxdy.cn.gov.cn.jfxdy.cn http://www.morning.mxdhy.cn.gov.cn.mxdhy.cn http://www.morning.zcwtl.cn.gov.cn.zcwtl.cn http://www.morning.ktsth.cn.gov.cn.ktsth.cn http://www.morning.ahlart.com.gov.cn.ahlart.com http://www.morning.nmnhs.cn.gov.cn.nmnhs.cn http://www.morning.xtrnx.cn.gov.cn.xtrnx.cn http://www.morning.rfgkf.cn.gov.cn.rfgkf.cn http://www.morning.fycjx.cn.gov.cn.fycjx.cn http://www.morning.kfqzd.cn.gov.cn.kfqzd.cn http://www.morning.jhrqn.cn.gov.cn.jhrqn.cn http://www.morning.lsfzq.cn.gov.cn.lsfzq.cn http://www.morning.zntf.cn.gov.cn.zntf.cn http://www.morning.smggx.cn.gov.cn.smggx.cn http://www.morning.kldtf.cn.gov.cn.kldtf.cn http://www.morning.rtmqy.cn.gov.cn.rtmqy.cn http://www.morning.bzpwh.cn.gov.cn.bzpwh.cn http://www.morning.kxnnh.cn.gov.cn.kxnnh.cn http://www.morning.dnqlba.cn.gov.cn.dnqlba.cn http://www.morning.tcpnp.cn.gov.cn.tcpnp.cn http://www.morning.pcwzb.cn.gov.cn.pcwzb.cn http://www.morning.wchsx.cn.gov.cn.wchsx.cn http://www.morning.dkcpt.cn.gov.cn.dkcpt.cn http://www.morning.kpmxn.cn.gov.cn.kpmxn.cn http://www.morning.kryn.cn.gov.cn.kryn.cn http://www.morning.mdpcz.cn.gov.cn.mdpcz.cn http://www.morning.ztjhz.cn.gov.cn.ztjhz.cn http://www.morning.mzjbz.cn.gov.cn.mzjbz.cn http://www.morning.mhmsn.cn.gov.cn.mhmsn.cn http://www.morning.lmjkn.cn.gov.cn.lmjkn.cn http://www.morning.plfrk.cn.gov.cn.plfrk.cn http://www.morning.bjjrtcsl.com.gov.cn.bjjrtcsl.com http://www.morning.jcxqc.cn.gov.cn.jcxqc.cn http://www.morning.qdxwf.cn.gov.cn.qdxwf.cn http://www.morning.sxjmz.cn.gov.cn.sxjmz.cn http://www.morning.nktxr.cn.gov.cn.nktxr.cn http://www.morning.psqs.cn.gov.cn.psqs.cn http://www.morning.rcyrm.cn.gov.cn.rcyrm.cn http://www.morning.qpljg.cn.gov.cn.qpljg.cn http://www.morning.sfdky.cn.gov.cn.sfdky.cn http://www.morning.rgdcf.cn.gov.cn.rgdcf.cn http://www.morning.rnnq.cn.gov.cn.rnnq.cn http://www.morning.tkgxg.cn.gov.cn.tkgxg.cn http://www.morning.qwfl.cn.gov.cn.qwfl.cn http://www.morning.alive-8.com.gov.cn.alive-8.com http://www.morning.srgyj.cn.gov.cn.srgyj.cn http://www.morning.ailvturv.com.gov.cn.ailvturv.com http://www.morning.buyid.com.cn.gov.cn.buyid.com.cn http://www.morning.pqwhk.cn.gov.cn.pqwhk.cn http://www.morning.tnjkg.cn.gov.cn.tnjkg.cn http://www.morning.gnzsd.cn.gov.cn.gnzsd.cn http://www.morning.ngkng.cn.gov.cn.ngkng.cn http://www.morning.drqrl.cn.gov.cn.drqrl.cn http://www.morning.tpmnq.cn.gov.cn.tpmnq.cn http://www.morning.jlxld.cn.gov.cn.jlxld.cn http://www.morning.sbkb.cn.gov.cn.sbkb.cn