j酒店管理系统课程设计.docx
- 文档编号:2185784
- 上传时间:2022-10-27
- 格式:DOCX
- 页数:18
- 大小:19.71KB
j酒店管理系统课程设计.docx
《j酒店管理系统课程设计.docx》由会员分享,可在线阅读,更多相关《j酒店管理系统课程设计.docx(18页珍藏版)》请在冰豆网上搜索。
j酒店管理系统课程设计
文件编码(008-TTIG-UTITD-GKBTT-PUUTI-WYTUI-8256)
j酒店管理系统课程设计
Java语言程序设计课程设计
题目酒店管理系统
学院南湖学院
专业计算机科学与技术
班级计科N112
学号
学生姓名吴威宗
指导教师李永刚
编写日期2014/6/26
一、需求分析
随着餐饮行业的迅速发展,现有的人工管理方式已经不能呢个满足管理者的需求,广大餐饮业经营者已经意识到使用计算机应用软件的重要性,决定在餐饮企业的经营管理上引入计算机应用软件管理系统。
酒店管理系统的大致功能:
1.开台点餐
2.菜品管理
3.自动结账
4.后台菜系菜品管理
5.日月年结账报表
6.用户设置
根据需求分析,本系统采用的语言:
(1)本系统采用Java语言,Java是目前使用最为广泛的计算机语言之一。
它具有简单,面向对象,稳定,与平台无关等特点。
说他简单,并不是说这门语言很干瘪,而是一种清楚更容易理解的方式实现程序。
面向对象是基于对象的变成更符合人的思维方式,使人们更容易编写程序。
(2)本系统还采用SQL语言,SQLServer具有许多显着优点:
易用性、适合分布组织的可伸缩性、用于决策支持的数据仓库功能、与许多其他服务器软件紧密关联的集成性、良好的性价比等。
(3)本系统有效的利用Java和SQL的优点。
二、系统运行环境
操作系统为Windows7、windowsXP或windows2003使用的集成开发工具Eclipse数据库采用SQLServer2008,项目运行环境为JDK7。
三、功能需求描述
1.开台签单工作区的功能:
主要功能有开台、点菜、加菜、签单、查看开台信息和签单信息。
2.自动结账工作区的功能:
一个功能是自动计算当前选中餐台的消费金额;另一个功能是在结账时自动计算找零金额。
3.结账报表工作区功能:
日结帐报表,月结账报表,年结账报表。
4.后天管理工作区功能:
管理添加信息
四、模块结构图
模块结构图
五、数据库设计
5.1数据库分析
酒店管理系统的需求包括开台点菜功能、智能化获取菜品功能、自动结账功能、营业额报表功能等。
在这些功能总主要涉及的数据表包括台号表、菜品表、消费单表;为了使系统更加的完善,还需要为菜品分类,即需要用到菜系表;为了实现菜品的日销售情况统计,还要建立一个消费项目表,用来记录消费单消费的菜品。
5.2数据库概念设计
数据库设计是系统设计过程中的重要组成部分,它是通过管理系统的整天需求而制定的,数据库设计的好坏直接影响到系统的后期开发。
5.3数据库逻辑结构设计
台号表
菜品表
菜系表
消费单表
消费项目表
管理员表
六、程序模块设计
功能模块整体设计:
用户功能界面:
代码:
publicclassLandFrameextendsJFrame{
privateJPasswordFieldpasswordField;etResource(
""));dd(panel,;ddActionListener(newUsernameComboBoxActionListener());etResource("");etResource(
"");etResource(
"");etResource("");
(newImageIcon(resetUrl));
URLresetOverUrl=().getResource(
"");
(newImageIcon(""));
URLresetPressedUrl=().getResource(
"");
(newImageIcon(resetPressedUrl));
(newResetButtonActionListener());
(resetButton);
finalJButtonexitButton=newJButton();
(newInsets(0,0,0,0));
(false);
(false);
URLexitUrl=().getResource("");
(newImageIcon(exitUrl));
URLexitOverUrl=()
.getResource("");
(newImageIcon(exitOverUrl));
URLexitPressedUrl=().getResource(
"");
(newImageIcon(exitPressedUrl));
(newExitButtonActionListener());
(exitButton);
UserNameOfNotFreeze();
if()==0){
("TSoft");
}else{
for(inti=0;i<();i++){
(i));
}
}
}
classUsernameComboBoxActionListenerimplementsActionListener{
publicvoidactionPerformed(ActionEvente){
StringuserName=(String)();
if("TSoft"))
("111");
}
}
classPasswordFieldFocusListenerimplementsFocusListener{
publicvoidfocusGained(FocusEvente){
("");
}
publicvoidfocusLost(FocusEvente){
char[]passwords=();
Stringpassword=turnCharsToString(passwords);
if()==0){
("");
}
}
}
classExitButtonActionListenerimplementsActionListener{
publicvoidactionPerformed(ActionEventarg0){
(0);
}
}
classResetButtonActionListenerimplementsActionListener{
publicvoidactionPerformed(ActionEventarg0){
(0);
("");
}
}
classLandButtonActionListenerimplementsActionListener{
publicvoidactionPerformed(ActionEvente){
Stringusername=().toString();UserByName(username);oString();rim();
}
}
数据库连接代码:
publicclassJDBC{
privateStringdbUserName="root";
privateStringdbPassword="123456";
/**
获取数据库连接
**/
publicConnectiongetCon()throwsException{
(jdbcName);
Connectioncon=(JDBC,dbUserName,dbPassword);
returncon;
}
/*
*关闭数据库连接
*
**/
publicvoidcloseCon(Connectioncon)throwsException{
if(con!
=null){
();
}
}
publicstaticvoidmain(String[]args){
JDBCJDBC=newJDBC();
try{
();
}catch(Exceptione){
etDefaultRenderer(columnClass);
etDefaultRenderer();
etLayout(newGridBagLayout());
setModal(true);
setTitle("修改密码");
DimensionscreenSize=().getScreenSize();
setBounds(-300)/2,-200)/2,
300,200);
finalJLabeloldPasswordLabel=newJLabel();
("原密码:
");
finalGridBagConstraintsgridBagConstraints_7=newGridBagConstraints();
=0;
=0;
getContentPane().add(oldPasswordLabel,gridBagConstraints_7);
oldPasswordField=newJPasswordField();
("");
(newFocusListener(){
publicvoidfocusGained(FocusEvente){
("");
}
publicvoidfocusLost(FocusEvente){
char[]passwords=();
Stringpassword=turnCharsToString(passwords);
if()==0){
("");
}
}
});
(25);
finalGridBagConstraintsgridBagConstraints_8=newGridBagConstraints();
=3;
=0;
=1;
getContentPane().add(oldPasswordField,gridBagConstraints_8);
finalJLabelnewPasswordLabel=newJLabel();
("新密码:
");
finalGridBagConstraintsgridBagConstraints=newGridBagConstraints();
=newInsets(10,0,0,0);
=1;
=0;
getContentPane().add(newPasswordLabel,gridBagConstraints);
newPasswordField=newJPasswordField();
("");
(newFocusListener(){
publicvoidfocusGained(FocusEvente)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 酒店 管理 系统 课程设计