jav酒店管理系统课程设计.docx
- 文档编号:26225978
- 上传时间:2023-06-17
- 格式:DOCX
- 页数:23
- 大小:35.53KB
jav酒店管理系统课程设计.docx
《jav酒店管理系统课程设计.docx》由会员分享,可在线阅读,更多相关《jav酒店管理系统课程设计.docx(23页珍藏版)》请在冰豆网上搜索。
jav酒店管理系统课程设计
ThelatestrevisiononNovember22,2020
jav酒店管理系统课程设计
Java语言程序设计课程设计
题目酒店管理系统
学院南湖学院
专业计算机科学与技术
班级计科N112
学号
学生姓名吴威宗
指导教师李永刚
编写日期2014/6/26
一、需求分析5
二、系统运行环境5
三、功能需求描述5
四、模块结构图6
五、数据库设计6
5.1数据库分析6
5.2数据库概念设计6
5.3数据库逻辑结构设计7
六、程序模块设计8
七、总结36
一、需求分析
随着餐饮行业的迅速发展,现有的人工管理方式已经不能呢个满足管理者的需求,广大餐饮业经营者已经意识到使用计算机应用软件的重要性,决定在餐饮企业的经营管理上引入计算机应用软件管理系统。
酒店管理系统的大致功能:
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){
("");
}
publicvoidfocusLost(FocusEvente){
char[]passwords=();
Stringpassword=turnCharsToString(passwords);
if()==0){
("");
}
}
});
(25);
finalGridBagConstraintsgridBagConstraints_1=newGridBagConstraints();
=newInsets(10,0,0,0);
=3;
=1;
=1;
getContentPane().add(newPasswordField,gridBagConstraints_1);
finalJLabelrepeatPasswordLabel=newJLabel();
("重新输入:
");
finalGridBagConstraintsgridBagConstraints_2=newGridBagConstraints();
=newInsets(10,0,0,0);
=2;
=0;
getContentPane().add(repeatPasswordLabel,gridBagConstraints_2);
repeatPasswordField=newJPasswordField();
("");
(newFocusListener(){
publicvoidfocusGained(FocusEvente){
("");
}
publicvoidfocusLost(FocusEvente){
char[]passwords=();
Stringpassword=turnCharsToString(passwords);
if()==0){
("");
}
}
});
(25);
finalGridBagConstraintsgridBagConstraints_3=newGridBagConstraints();
=3;
=newInsets(10,0,0,0);
=2;
=1;
getContentPane().add(repeatPasswordField,gridBagConstraints_3);
finalJLabellabel=newJLabel();
(newDimension(30,20));
finalGridBagConstraintsgridBagConstraints_6=newGridBagConstraints();
=3;
=1;
getContentPane().add(label,gridBagConstraints_6);
finalJButtonsubmitButton=newJButton();
(newActionListener(){
publicvoidactionPerformed(ActionEvente){
char[]oldPasswords=();
StringoldPassword=turnCharsToString(oldPasswords);
char[]newPasswords=();
StringnewPassword=turnCharsToString(newPasswords);
char[]repeatPasswords=();
StringrepeatPassword=turnCharsToString(repeatPasswords);
if()==0||()==0
||()==0){
(null,"请输入密码!
","友情提示",
;
("");
("");
("");
return;
}
Stringpassword=(5).toString();
if(password)){
if(repeatPassword)){
Stringusername=
(1).toString();
(5,newPassword);
(username,newPassword);
(null,"密码修改成功!
","友情提示",
;
dispose();
}else{
(null,
"您两次输入的新密码不一致,请确认后重新输入!
","友情提示",
;
("");
("");
("");
}
}else{
(null,"您输入的原密码错误,请确认后重新输入!
",
"友情提示",;
("");
("");
("");
}
}
});
("确定");
finalGridBagConstraintsgridBagConstraints_4=newGridBagConstraints();
=newInsets(10,0,0,0);
=3;
=2;
getContentPane().add(submitButton,gridBagConstraints_4);
finalJButtonexitButton=newJButton();
(newActionListener(){
publicvoidactionPerformed(ActionEvente){
dispose();
}
});
("退出");
finalGridBagConstraintsgridBagConstraints_5=newGridBagConstraints();
=newInsets(10,10,0,0);
=3;
=3;
getContentPane().add(exitButton,gridBagConstraints_5);
rim();
}
publicvoidsetUser(Vectoruser){
=user;
}
}
用户管理对话框:
publicclassUserManagerDialogextendsJDialog{
privateMTabletable;
privateVector
privateVector
privateDefaultTableModeltableModel;
privateButtonGroupbuttonGroup=newButtonGroup();
privateJTextFieldpasswordTextField;
privateJTextFieldidCardTextField;
privateJTextFieldbirthdayTextField;
privateJTextFieldnameTextField;
privateDaodao=();
privatebooleanisAdd=true;
/**
*Launchtheapplication
*
*@paramargs
*/
publicstaticvoidmain(Stringargs[]){
dd(inputPanel,;
finalJLabelnameLabel=newJLabel();
("姓名:
");
finalGridBagConstraintsgridBagConstraints_13=newGridBagConstraints();
=newInsets(10,0,0,0);
(nameLabel,gridBagConstraints_13);
nameTextField=newJTextField();
(12);
finalGridBagConstraintsgridBagConstraints=newGridBagConstraints();
=newInsets(10,0,0,0);
=0;
=1;
(nameTextField,gridBagConstraints);
finalJLabelsexLabel=newJLabel();
("性别:
");
finalGridBagConstraintsgridBagConstraints_1=newGridBagConstraints();
=newInsets(10,15,0,0);
=0;
=2;
(sexLabel,gridBagConstraints_1);
finalJRadioButtonmanRadioButton=newJRadioButton();
(manRadioButton);
("男");
(true);
finalGridBagConstraintsgridBagConstraints_2=newGridBagConstraints();
=newInsets(10,0,0,0);
=0;
=3;
(manRadioButton,gridBagConstraints_2);
finalJRadioButtonwomanRadioButton=newJRadioButton();
(womanRadioButton);
("女");
finalGridBagConstraintsgridBagConstraints_3=newGridBagConstraints();
=newInsets(10,0,0,0);
=0;
=4;
(womanRadioButton,gridBagConstraints_3);
finalJLabelbirthdayLabel=newJLabel();
("出生日期:
");
finalGridB
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- jav 酒店 管理 系统 课程设计