




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、通訊錄管理系統(tǒng)設(shè)計(jì)報(bào)告 姓名: spring brother 學(xué)號(hào): 專業(yè): 指導(dǎo)教師: 目目目 錄錄錄 【摘要摘要】 .3第第 1 1 章章 概述概述 (_黑體小二號(hào)字黑體小二號(hào)字).41.1 系統(tǒng)實(shí)現(xiàn)的目標(biāo) (黑體小三號(hào)字) .41.2 系統(tǒng)實(shí)現(xiàn)方案.41.3 系統(tǒng)實(shí)現(xiàn)環(huán)境.41. 4 具體的開發(fā)方法.4第第 2 2 章章 系統(tǒng)設(shè)計(jì)系統(tǒng)設(shè)計(jì) .52.1 總體設(shè)計(jì).52.2 類設(shè)計(jì).52.3 數(shù)據(jù)結(jié)構(gòu).52.4 界面設(shè)計(jì).5第第 3 3 章章 系統(tǒng)實(shí)現(xiàn)系統(tǒng)實(shí)現(xiàn) .6參考文獻(xiàn) .7【摘要摘要】日益繁多的人際交往使得我們很難記住與每個(gè)人之間的聯(lián)系方式,通訊錄能夠便捷的給我們帶來所需要的相關(guān)信息。
2、而隨著計(jì)算機(jī)的普及,人們的生活擺脫了傳統(tǒng)式的記事本、電話簿,越來越多的靠計(jì)算機(jī)或者手機(jī)中的電話簿程序來幫助人們記住這些事情,極其簡(jiǎn)便。這就需要有一個(gè)使用的通訊錄管理系統(tǒng),用戶可以方便的通過自己電腦的通訊錄管理系統(tǒng),來隨時(shí)查閱自己所需要的信息,而不必再大費(fèi)周折去翻開那繁瑣的記事本。通訊錄管理系統(tǒng)是一個(gè)專門針對(duì)儲(chǔ)存用戶聯(lián)系方式以及一些簡(jiǎn)單個(gè)人信息的實(shí)用管理系統(tǒng),它方便了用戶對(duì)眾多客戶、朋友、同事等個(gè)人信息的儲(chǔ)存和快速查閱的功能,大大減少了查找過程的時(shí)間。【關(guān)鍵詞】c+ 通訊錄管理 查找 修改 刪除 類 第第 1 1 章章 概述概述1.1 系統(tǒng)實(shí)現(xiàn)的目標(biāo)(1)錄入:通訊錄信息包括:姓名,電話,地址,
3、e-mail,郵編等信息。(2)更新:能插入、刪除通訊錄信息。.(3)瀏覽:能夠查看所有的通訊錄信息。 (4)查詢:能實(shí)現(xiàn)指定姓名信息查詢或指定編號(hào)查詢功能。(5)系統(tǒng)以菜單方式工作,界面友好,易于操作。1.2 系統(tǒng)實(shí)現(xiàn)方案為實(shí)現(xiàn)系統(tǒng)功能,本程序主要分為五個(gè)模塊。它們分別為:輸入一個(gè)信息、刪除一個(gè)信息、查詢一個(gè)信息、插入一個(gè)信息、列出所有的信息、退出該程序。這五個(gè)函數(shù)再通過主函數(shù)調(diào)用分別得以實(shí)現(xiàn)。主函數(shù),首先提供了程序運(yùn)行時(shí)的友好界面,列出了清單,提供用戶做出選擇,以便決定使用通訊錄的哪種功能。然后,通過執(zhí)行多分支選擇語句switch 語句,分別實(shí)現(xiàn)其它各個(gè)函數(shù)的調(diào)用功能。1.3 系統(tǒng)實(shí)現(xiàn)環(huán)境
4、通過 vc+6.0 用 c+語言對(duì)程序進(jìn)行編寫設(shè)計(jì)在 windows 界面下用 dos 訪問1.4 具體的開發(fā)方法用面向?qū)ο蟮某绦蛟O(shè)計(jì)方法,運(yùn)用 c+語言編寫程序進(jìn)行該學(xué)生考勤管理系統(tǒng)的詳細(xì)設(shè)計(jì),使之能提供錄入、顯示、查找、刪除、修改的功能。最后在 vc+6.0 環(huán)境下編寫和調(diào)試程序,進(jìn)而完成系統(tǒng)的實(shí)現(xiàn)。第第 2 2 章章 系統(tǒng)設(shè)計(jì)系統(tǒng)設(shè)計(jì)2.1 總體設(shè)計(jì)用戶界面刪除編輯主函數(shù)查找退出輸入顯示功能:1輸入聯(lián)系人的信息2顯示聯(lián)系人的信息3查找聯(lián)系人的信息4刪除聯(lián)系人的信息5編輯人的信息2.22.2 類設(shè)計(jì)類設(shè)計(jì)2.3 數(shù)據(jù)結(jié)構(gòu)序號(hào)數(shù)據(jù)項(xiàng)標(biāo)識(shí)符類型范圍1姓名namechar202電話telchar
5、153e-mailemailchar304地址addchar205郵編postcodechar15編號(hào)姓名電話e-mail地址郵編manage-head:book*-key:int+ manage()+ manage()+input():void+mend():void+del();void+find(*p:book*,num:int,pn=”:char*+found():void+show():void+count():void+save():void+begin():void+clear():void+mainmenu():char+getkey():int+setkey(k:int):v
6、oidbook#num:int;#char name20: char;#sex6 :char;#age :int;#birth20:char;#add20:char;# tel15: char;#email30: char +next(:book*)+book()+ book()+getnum():int+getname():char*+getsex():char+getage():char+getbirth():char+getadd():char+gettel():char+getemail():char+input():void+output():void1趙匡胤x 市 x 路 xx 號(hào)
7、8300112錢冠x 市 x 路 xx 號(hào)5720003孫權(quán)x 市 x 路 xx 號(hào)2414444李白x 市 x 路 xx 號(hào)2455512.4 界面設(shè)計(jì)提示:提示:系統(tǒng)的主窗體、登陸窗口、數(shù)據(jù)編輯窗口、數(shù)據(jù)查詢、數(shù)據(jù)輸出登陸界面: 通 迅 錄 1. 添加新聯(lián)系人 4. 修改聯(lián)系人信息 2. 刪除聯(lián)系人 5. 查找聯(lián)系人. 3. 顯示所有聯(lián)系人 6. 退出程序 輸出界面:姓名 電話 e-mail 地 址 郵編xx 3243244 三亞荔枝溝鎮(zhèn) 123 號(hào) 572000第第 3 3 章章 系統(tǒng)實(shí)現(xiàn)系統(tǒng)實(shí)現(xiàn)#ifndef yyy#define yyy#include#include#include
8、#include using namespace std;class book protected: int num; char name20; char sex6; char add20; char tel15; char email30;public: book *next; book() book() char* getname() return name; int getnum() return num; void input() int e=1; cout按照提示輸入:endl;coutnum; coutname; do coutsex; if(strcmp(sex,男)=0 | s
9、trcmp(sex,女)=0) coutage; couttt 輸入生日: ; coutadd; couttel; coutemail; e=0; else coutttt 無此類型性別!重新輸入!endl; e=1; while(e); void input(book &is) is.num;;is.sex;is.add;is .tel;is.email; void output() cout基本信息如下:endl; cout編號(hào):num 姓名:name 性別:sex 地址:add 電話:tel e-mail:emailendl; void output(book &a
10、mp;os) os.num; ; os.add; os.tel; os.email; ;#endif登陸界面:信息錄入:信息查詢:參考文獻(xiàn)美robert l.krusw,alexander j.ryba 著,錢麗萍譯,c+數(shù)據(jù)結(jié)構(gòu)與程序設(shè)計(jì),清華大學(xué)出版社,2004譚浩強(qiáng)編著,c+程序設(shè)計(jì),清華大學(xué)出版社,2004刁成嘉主編,面向?qū)ο?c+程序設(shè)計(jì),機(jī)械工業(yè)出版社,2004附錄#include #include #include #include #include using namespace std;class bookpublic: book();/默認(rèn)構(gòu)造函數(shù) char
11、inter_face();/首頁 void add_person();/添加聯(lián)系人 void del_person();/刪除聯(lián)系人 void show_all();/顯示所有聯(lián)系人 void alter();/修改信息 void select();/查詢聯(lián)系人 void save_new();/保存新增加的聯(lián)系人private: string name;/姓名 string address;/地址 string number;/電話號(hào)碼 string post;/郵編 string mail;/e-mail;book:book() name = 0; address = 0; number
12、= 0; post = 0; mail = 0;/首頁char book:inter_face() system(cls); cout endl; couttt endl tt endl tt 通 迅 錄 endl tt endl tt 1. 添加新聯(lián)系人 4. 修改聯(lián)系人信息 endl tt endl tt 2. 刪除聯(lián)系人 5. 查找聯(lián)系人. endl tt endl tt 3. 顯示所有聯(lián)系人 6. 退出程序 endl tt endl tt endl endl choose; fflush(stdin); return choose;/添加聯(lián)系人void book:add_person(
13、) cout endl 根據(jù)下面提示輸入新聯(lián)系人信息 endl endl name; fflush(stdin); cout number; fflush(stdin); cout mail; fflush(stdin); cout post; fflush(stdin); cout address; fflush(stdin); save_new(); cout endl endl 聯(lián)系人信息已保存 endl endl; system(pause);/刪除聯(lián)系人void book:del_person() ofstream outdata(temp.txt, ios:out); ifstre
14、am indata(pbook.txt, ios:in); /if (!outdata | !indata) cout endl 文件未找到 endl; system(pause); return; string sign; cout endl sign; string str1; bool flag = true; string str; while (indata name number) getline(indata, str); if (sign=name) | (sign=number) cout endl 請(qǐng)輸入想刪除的聯(lián)系人: endl endl; cout str1 endl;
15、 cout setiosflags(ios:left) setw(17) name number str endl; flag = false; break; outdata setiosflags(ios:left) setw(17) name number str endl; if (flag) cout endl 電話簿中無此人 endl endl; else while (getline(indata, str) outdata str endl; outdata.close(); indata.close(); ofstream out(pbook.txt, ios:out); if
16、stream in(temp.txt, ios:in); if (!out | !in) cout endl 文件不能打開 endl endl; system(pause); return; while (getline(in, str) out str endl; out.close();/ in.close(); cout endl 信息已刪除 endl endl; system(pause); /顯示所有聯(lián)系人void book:show_all() ifstream indata(pbook.txt,ios:in); if (!indata) cout endl 沒有找到文件 endl
17、; system(pause); return; bool flag = true; string record; while (getline(indata, record) if (flag) cout endl 所有聯(lián)系人信息如下: endl; cout endl 姓名 電話 e-mail 郵編 地址: endl; cout record endl; flag = false; if (flag) cout endl 你的通迅錄中沒有聯(lián)系人! endl endl; else cout endl 所有聯(lián)系人已經(jīng)全部顯示出來! endl endl; system(pause);/修改信息vo
18、id book:alter() ofstream outdata(temp.txt, ios:out); ifstream indata(pbook.txt, ios:in); /if (!outdata | !indata) cout endl 未找到文件 endl; system(pause); return; string sign; cout endl sign; string str1; bool flag = true; string str; while (indata name number) getline(indata, str); if (sign=name) | (si
19、gn=number) cout endl 輸入想修改的聯(lián)系人: endl endl; cout str1 endl; cout setiosflags(ios:left) setw(17) name number str endl; cout endl 請(qǐng)根據(jù)下面提示修改信息 : endl; cout name; fflush(stdin); cout number; fflush(stdin); cout mail; fflush(stdin); cout post; fflush(stdin); cout address; fflush(stdin); save_new(); flag =
20、 false; break; outdata setiosflags(ios:left) setw(17) name number str endl; if (flag) cout endl 通訊簿中無此人 endl endl; else while (getline(indata, str) outdata str endl; outdata.close(); indata.close(); ofstream out(pbook.txt, ios:out); ifstream in(temp.txt, ios:in); if (!out | !in) cout endl 文件不能打開 end
21、l endl; system(pause); return; while (getline(in, str) out str endl; out.close(); in.close(); cout endl 信息已修改 endl endl; system(pause); /查詢聯(lián)系人void book:select() ifstream indata(pbook.txt,ios:in); if (!indata) cout endl 文件未找到 endl; system(pause); return; string sign; cout endl sign; fflush(stdin); string str1; bool flag = true; string str; while (indata name number) getline(indata, str); if (name=sign) | (number=sign) cout endl 你要查找的聯(lián)系人是: endl endl; cout str1 endl; cout setiosflags(ios:left) setw(17) name number str e
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 原地回遷合同范本
- 體育冠名合同范本
- 合同范例起訴書
- 展會(huì)招商渠道合同范本
- 單位簽合同范例
- 合同范本格式 字體
- 冷鏈車輛采購合同范本
- 臨時(shí)安置房建設(shè)合同范本
- 樓地面找平合同范本
- 合同范例機(jī)械產(chǎn)品
- 產(chǎn)品方案設(shè)計(jì)模板
- 部隊(duì)通訊員培訓(xùn)
- 《市值管理探究的國內(nèi)外文獻(xiàn)綜述》4000字
- 2024-2030年中國企業(yè)在安哥拉投資建設(shè)化肥廠行業(yè)供需狀況及發(fā)展風(fēng)險(xiǎn)研究報(bào)告版
- 物業(yè)公司水浸、水管爆裂事故應(yīng)急處置預(yù)案
- 河南省公務(wù)員面試真題匯編7
- 高管履歷核實(shí)調(diào)查報(bào)告
- SF-T0095-2021人身損害與疾病因果關(guān)系判定指南
- 2024并網(wǎng)光伏逆變器技術(shù)規(guī)范
- 文言文多文本閱讀:叔向見韓宣子(附答案解析與譯文)
- 工程招投標(biāo)模擬實(shí)訓(xùn)報(bào)告范文2024年
評(píng)論
0/150
提交評(píng)論