C语言程序设计结题报告Word文件下载.docx

上传人:b****5 文档编号:21727138 上传时间:2023-02-01 格式:DOCX 页数:13 大小:210.51KB
下载 相关 举报
C语言程序设计结题报告Word文件下载.docx_第1页
第1页 / 共13页
C语言程序设计结题报告Word文件下载.docx_第2页
第2页 / 共13页
C语言程序设计结题报告Word文件下载.docx_第3页
第3页 / 共13页
C语言程序设计结题报告Word文件下载.docx_第4页
第4页 / 共13页
C语言程序设计结题报告Word文件下载.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

C语言程序设计结题报告Word文件下载.docx

《C语言程序设计结题报告Word文件下载.docx》由会员分享,可在线阅读,更多相关《C语言程序设计结题报告Word文件下载.docx(13页珍藏版)》请在冰豆网上搜索。

C语言程序设计结题报告Word文件下载.docx

其中,用户可以通过机器自助订房,减轻了前台的负担,也使订房速度更加便捷,使客户得到更便捷的服务。

1.系统管理员应该具有初步的对用户的浏览增加删除查看的功能,对用户密码的初始化,修改管理员自身的登录密码以及备份系统信息功能,以防系统信息丢失。

2.客户可以在自助机器上进行订房,先查看房间,然后选择适合的房间订房,查看自己历史订房信息以及修改自己的信息(身份证号与手机号),如果该用户没有注册过,那么可以在界面选择注册,注册后自动登录然后实现其他操作。

3.前台可以查看房间信息,可以查看当前酒店住店所入住用户,办理订房、退房以及查看收益信息,以实现良好的酒店财务管理等等。

三、系统分析与设计

1.系统功能的需求

(系统的各个子模块的业务流程和模块的功能进行简单的介绍)

系统管理员管理功能模块:

系统管理员拥有最高权限,能进行用户的添加、删除、各个用户信息的修改等功能,另外,具有初始化各用户密码,系统备份等功能。

前台管理功能模块:

前台管理员能够浏览已入住用户、查询房间信息、修改个人信息和修改登录密码,办理订房、退房,查看收益信息功能。

顾客管理功能模块:

拥有查找空房间、各类房间的价格、办理入住和退房、结账、显示顾客信息、修改个人信息、修改登录密码的功能。

经过分析,我们对程序有了初步了解。

列出了每个角色的功能以及如何实现等操作。

2.系统的主要模块

程序的模块很直观的反映出软件能够实现的功能,由下面的模块可以很直观的看出我们设计的餐厅管理系统程序能够方便的实现为顾客查询房间、办理入住和退房、结账、查询顾客信息、各个用户角色登录等。

1.在系统管理员增加用户部分,实现了录入用户的编号、姓名、手机号和身份证号这一系列信息的功能。

2.在显示和添加和删除房间部分,显示全部房间具体信息。

3.在删除用户信息部分,我们设计了三个函数,可以实现删除其中无用的用户信息,回到主菜单。

4.在修改个人信息模块,我们通过可以修改的部分,也就是将身份证号与手机号进行修改。

5.在顾客办理入住模块,我们通过顾客的编号,来记录顾客的住房信息,最后能让顾客看到自己花了多少钱

以下为登录流程图:

主要先实现对框架的设计以及链接设计。

由此我们设计了界面函数如下图所示:

进入不同的角色界面如图:

系统管理:

前台:

客户

部分功能代码展示:

主函数:

intmain()

{

intc,loop=1,userTotal;

charcurrentUserId[LENGTH_OF_USERID+1];

useruserArray[MAX_USER];

userTotal=readUserFromFile(userArray,"

user.dat"

);

//从文件中读入用户信息

while(loop)

{

system("

cls"

//清除屏幕

c=mainMenu();

//显示登录菜单

switch(c)

case1:

//登录系统

c=login(currentUserId);

//调用身份验证函数,返回用户角色

enterSystem(c,currentUserId);

//显示不同角色对应的菜单

break;

case2:

//注册账号

AddUser(userArray,&

userTotal,1);

writeUserToFile(userArray,userTotal,"

//存盘

default:

//退出系统

loop=0;

}

showtime

(1);

return0;

}

登陆函数:

intlogin(charcurrentUserId[])

//用户数组

intuserTotal;

//用户总数

intcounter=3;

charverificationCode[5];

//存放验证码

charinputVerificationCode[5];

//存入用户输入的验证码

charoriginalPassWord[LENGTH_OF_PASS+1];

charpassword[LENGTH_OF_PASS+1];

intpos;

while(counter>

0)

{system("

counter--;

displayTopic("

媛媛酒店欢迎您-->

用户登录"

printf("

\t\t\t用户名:

[]\b\b\b\b\b\b\b\b\b\b\b\b"

scanf("

%s"

currentUserId);

\t\t\t密码:

inputPassWord(password,7);

getVerificationCode(verificationCode,4);

\t\t\t验证码:

[]%s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"

verificationCode);

inputVerificationCode);

pos=userSearch(userArray,userTotal,currentUserId);

if(pos==-1)

{printf("

该用户不存在!

还有%d次登录机会。

\n"

counter);

getch();

continue;

else

{strcpy(originalPassWord,userArray[pos].password);

if(strcmp(originalPassWord,password)!

=0)

输入的密码有误,还有%d次登录机会。

if(strcasecmp(verificationCode,inputVerificationCode)!

输入的验证码有误,还有%d次登录机会。

returnuserArray[pos].role;

//返回用户角色

return-1;

//登录失败

进入不同系统函数:

voidenterSystem(intc,charcurrentUserId[])

//c==1表示系统管理员用户

AdminSystem(currentUserId);

//c==2表示前台管理员登录

ManagerSystem(currentUserId);

case3:

case0:

//c==3表示用户

userSystem(currentUserId);

四、不同模块链接与设计

如上图代码,通过用户结构体中的角色代码,来判断进入不同的界面所显示的是哪类型的角色应该显示的界面。

模块通过主函数进行链接,通过主函数来进入不同的模块函数,进而进行操作。

主模块展示

intmainMenu();

//登录菜单

intmenuManager();

//前台角色子程序菜单

intmenuUser();

//用户程序菜单

intmenuAdmin();

//系统管理员角色子程序菜单

voidManagerSystem(charcurrentUserId[]);

//前台角色子程序

voiduserSystem(charcurrentUserId[]);

//客户角色子程序

voidAdminSystem(charcurrentUserId[]);

//系统管理员角色子程序

模块功能和代码展示

功能如上图所示,部分代码如下:

voidAdminSystem(charcurrentUserId[])//系统管理员用户

intloop=1;

while(loop==1)

intchose,userTotal,houseTotal,Inf_Total,money_total;

infhouseInf[1000],money_All[1000];

Inf_Total=read_Inf_FormFile(houseInf,"

inf.dat"

money_total=read_Inf_FormFile(money_All,"

money.dat"

//读取收益信息

househouseArray[1000];

houseTotal=readHouseFromFile(houseArray,"

house.dat"

chose=menuAdmin();

switch(chose)

//浏览用户

print_user_information(userArray,userTotal);

pause"

//添加用户

userTotal,0);

//删除用户

delUser(userArray,&

userTotal,currentUserId,0);

case4:

//初始化用户密码

//显示

reset_UserPassword(userArray,userTotal);

case5:

//修改登录密码

reset_MyPassword(userArray,userTotal,currentUserId);

case6:

//系统备份

backUp(userArray,userTotal,houseArray,houseTotal,houseInf,Inf_Total,money_All,money_total);

五、主要函数名称以及功能

char*getRole(intcode);

//获取角色

intreadUserFromFile(useruserArray[],char*f);

//读取文件

intreadHouseFromFile(househouseArray[],char*f);

//读取房间信息

//获取角色

voidinputPassWord(charpassword[],intn);

//输入密码

voidgetVerificationCode(charverificationCode[],intn);

//获取验证码

intuserSearch(useruserArray[],intuserTotal,charid[]);

//搜索用户位置

voidwriteUserToFile(useruserArray[],intuserTotal,char*f);

//写入文件

voidprintHouse(househouseArray[],inthouseTotal);

//查看房间信息

voiduserChose(househouseArray[],inthouseTotal,useruserArray[],intuserTotal,charcurrentUserId[]);

//用户订房间

voidwriteInformation(charcurrentUserId[],charname[],intnumber,intfloor,intday,char*f);

//记录入住情况写入文件

voidwriteHouseToFile(househouseArray[],int*houseTotal,char*f);

//写入房间信息

intmyInf(charcurrentUserId[],infhouseInf[],char*f);

//获取我的订房记录信息到数组中

voidprintMyInf(infhouseInf[],intcounter,charcurrentUserId[]);

//输出我的订房信息

intcheckOut(inta,infhouseInf[],intcounter,charcurrentUserId[],useruserArray[],intuserTotal,househouseArray[],inthouseTotal);

//结账退房

voidchangeUserInformation(useruserArray[],intuserTotal,charcurrentUserId[]);

//更改信息

voidreset_MyPassword(useruserArray[],intuserTotal,charuserId[]);

//修改当前登录密码

voidmanagerCheck(useruserArray[],intuserTotal,househouseArray[],inthouseTotal,int*money);

//前台退房

voidprintOnlineUser(useruserArray[],intuserTotal,infhouseInf[],intcounter);

//输出酒店已入住用户

intread_Inf_FormFile(infhouseInf[],char*f);

//读取入住总记录

voidprint_Inf(intc,infhouseInf[],intInf_Total);

//输出总记录

voidChose_To_Print(inta,infhouseInf[],intInf_Total);

//按要求——输出总记录

voidadd_room(househouseArray[],int*n);

//增加房间

introom_search(intnumber,househouseArray[],inthouseTotal);

//搜索是否存在改号码的房间

voiddel_room(househouseArray[],int*n);

//删除房间

voidprint_user_information(useruserArray[],intuserTotal);

//浏览用户

voidAddUser(useruserArray[],int*userTotal,inta);

//添加用户

voiddelUser(useruserArray[],int*n,charcurrentUser[],inta);

voidreset_UserPassword(useruserArray[],intuserTotal);

//初始化用户密码

voidprint_money(infmoney[],intcounter);

//输出收益信息

voidbackUp(useruserArray[],intuserTotal,househouseArray[],inthouseTotal,infhouseInf[],intInf_Total,infmoney_All[],intmoney_total);

//备份信息

voidbackUp_user(useruserArray[],intuserTotal);

//备份用户信息

voidbackUp_room(househouseArray[],inthouseTotal);

//备份房间信息

voidbackUp_inf(infhouseInf[],intInf_Total);

//备份入住信息

voidbackUp_inf2(infmoney_All[],intmoney_total);

//备份收益信息

voidwrite_Information(infhouseInf[],intInf_Total,char*f);

//写入总入住信息

六、部分功能测试以及效果展示

用户登录:

客户订房:

前台浏览在酒店用户:

0001到前台退房:

前台收班:

退出系统:

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

当前位置:首页 > 法律文书 > 辩护词

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

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