c单词学习软件课程设计报告内附程序源代码.docx

上传人:b****3 文档编号:1072782 上传时间:2022-10-16 格式:DOCX 页数:58 大小:193.21KB
下载 相关 举报
c单词学习软件课程设计报告内附程序源代码.docx_第1页
第1页 / 共58页
c单词学习软件课程设计报告内附程序源代码.docx_第2页
第2页 / 共58页
c单词学习软件课程设计报告内附程序源代码.docx_第3页
第3页 / 共58页
c单词学习软件课程设计报告内附程序源代码.docx_第4页
第4页 / 共58页
c单词学习软件课程设计报告内附程序源代码.docx_第5页
第5页 / 共58页
点击查看更多>>
下载资源
资源描述

c单词学习软件课程设计报告内附程序源代码.docx

《c单词学习软件课程设计报告内附程序源代码.docx》由会员分享,可在线阅读,更多相关《c单词学习软件课程设计报告内附程序源代码.docx(58页珍藏版)》请在冰豆网上搜索。

c单词学习软件课程设计报告内附程序源代码.docx

c单词学习软件课程设计报告内附程序源代码

c单词学习软件课程设计报告内附程序源代码

课程设计报告

需求分析:

题目:

单词学习软件

单词(中英文)录入、修改、删除管理、提供多种(至少三种、例如,给出英文选中文,给出中文写英文等)单词学习方法以,对出错单词能够进行查询、统计、排序。

首先它是个软件要有登入用户,其次要有对单词的操作(增删改),再是单词学习方法三种以上以及对学习方法过程中出错的单词能够进行存储查询、统计、排序等。

概要设计:

整个系统分为三大模块,先是用户登入模块供用户登入还包括了整个系统的界面的设计,这里设了一个用户类classuser{

public:

charusername[20];

charpassword[20];

user(charname[],charmm[]);

intfind(charname[]);

voiduserregister();

voiduserjudge();

charcustom();

charserver1();

charserver2();

friendcharcontinueif();

friendintuser_long(long,char);

};

主要有用户注册userregister()、用户判断userjudge(),第一个主菜单界面custom()、二个子菜单界面server1()\server2()等成员函数;

再是对单词的一系列操作增删改及额外添加的翻译模块,这里设计了一个单词类classwords{

public:

charenglish[20];

charchinese[40];

voidwords_get(charen[],charch[]);

voidwords_add();

voidwords_delete();

voidwords_revise();

voidwords_translate();

friendintwords_long(long,charaa[]);

friendlongwords_seek(charch[]);

friendintwords_long2(long,charaa[]);//倒数

friendstructword*creat();

friendvoidwritefile(structword*);

};

主要有单词增加words_add()、单词删除words_delete()、单词修改words_revise()、单词翻译words_translate()等成员函数及一些友元函数;

最后一个模块是单词学习方法,这里设计了个单词游戏类classwordsgame{

public:

voidgame_get(charen[]);

intgame_abc();

intgame_tran();

voidgame_judge();

voidwrongwords_add();

voidwrongwords_examine();

voidwordsgame:

:

wrongwords_search();

structwrongword*wrongwords_creat();

friendlongwrongwords_seek(charen[]);

friendintwords_long(long,char);

friendintwrongwords_long(long,charaa);

friendstructword*creat();

friendvoidprint(structword*);

friendintsuiji(intnum);

};

主要有给出英文单词选中文(三选一)game_abc()、给出中文写英文(对中文单词进行翻译)game_tran()、增加错误单词wrongwords_add()、查看错词本(里面全是game_tran()过程中翻译错了的单词记录在里面)wrongwords_examine()、在错词本中查找出错单词并统记出错次数wrongwords_search()等成员函数及一些友元供调用的函数。

详细设计:

描述系统各模块的实现方法,程序流程、系统界面等。

(重点叙述自己的详细设计)

首先用户登入及系统界面模块通过类user来实现的,用户先通过成员函数

voiduser:

:

userregister()

{

ofstreamllw;

("f:

\\",ios:

:

app);

if(find(username)==1)

{

cout<<"用户名已存在"<

exit(-1);

}

else

{

(username,strlen(username));

('');

(password,strlen(password));

('\n');

system("cls");

cout<<"\n\n\t\t\t\t注册成功!

"<

}

}

,然后输入注册了的帐号和密码通过成员函数

voiduser:

:

userjudge()

{

if(find(username)!

=1)

{

cout<<"用户名不存在!

"<

exit(-1);

}

elseif(find(username)==1&&find(password)!

=2)

{

cout<<"用户密码错误!

"<

exit(-1);

}

else

{

system("cls");

for(inti=10;i>=1;i--)

{

cout<<"\n\n\t\t\t欢迎您使用该软件"<<'\n'<<"\t\t\t制作人:

llw"<

cout<<"\n\n\n\n\n\t\t\t初始化中......"<

_sleep(500);

system("cls");

}

system("color2b");

//system("cls");

//system("color2b");

cout<<"\n\n\n\n\n\n\n\n\t\t\t初始化成功...!

"<

_sleep(3000);

//system("pause");

}

}

来判定用户是否可以继续下面的操作,如果判定通过则跳入到第一个主菜单custom()

charuser:

:

custom()//主菜单界面

{

charA[10];

charb;chari;

intk=0;

system("cls");

cout<<"\n\n"

<<"\t\t#####################################\n"

<<"\t\t#学习方式:

#\n"

<<"\t\t##\n"

<<"\t\t##\n"

<<"\t\t##\n"

<<"\t\t#####################################\n"<

while

(1)

{

cout<<"\t\t请选择学习方式:

";

cin>>A;

if(strlen(A)==1)

{

for(i='0';i<='2';i++)

{

b=i;

if(b==A[0])

returnb;

}

}

cout<<"\n\t\t\t输入有误!

\n"<

k++;

if(k>4)

{

system("cls");

cout<<"\n\n\t\t\t提示:

错误输入超过5次!

您将被强制退出!

!

\n"<

//cout<<"\t\t按任意键继续"<

exit(-1);

}

}

}

有二个选项分通向二个子菜单server1()

charuser:

:

server1()

{

CharA[10];

Charb;

chari;

intk=0;

system("cls");

cout<<"\n\n"

<<"\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n"

<<"\t\t$$\n"

<<"\t\t$功能$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n"<

while

(1)

{

cout<<"\t\t请选择操作方式:

";

cin>>A;

if(strlen(A)==1)

{

for(i='0';i<='5';i++)

{

b=i;

if(b==A[0])

returnb;

}

}

cout<<"\n\t\t\t\t输入有误!

\n"<

k++;

}

if(k>4)

{

cout<<"错误输入超过5次!

\n";

exit(-1);

}

}

和server2()

Charuser:

:

server2()

{

charA[10];

charb;

chari;

intk=0;

system("cls");

cout<<"\n"

<<"\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n"

<<"\t\t$单词游戏$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$\n"

<<"\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n"<

while

(1)

{

cout<<"\t\t请选择操作方式:

";

cin>>A;

if(strlen(A)==1)

{

for(i='0';i<='5';i++)

{

b=i;

if(b==A[0])

returnb;

}

}

cout<<"\n\t\t\t\t输入有误!

\n"<

k++;

}

if(k>4)

{

cout<<"错误输入超过5次!

\n";

exit(-1);

}

}

分别对应着其他二个模块;server1()界面对应着单词的增删改及翻译模块通过类words来实现,有单词的增加、单词的删除、单词的修改及单词的翻译功能;单词的增加通过words_add()

voidwords:

:

words_add()

{

charen[20],ch[40];

cout<<"请输入要添加的英文单词和中文意思"<

cin>>en>>ch;

words

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1