ja酒店管理系统课程设计_第1页
ja酒店管理系统课程设计_第2页
ja酒店管理系统课程设计_第3页
ja酒店管理系统课程设计_第4页
ja酒店管理系统课程设计_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Java语言程序设计课程设计题目 酒店管理系统学院 南湖学院专业 计算机科学与技术班级 计科N112学号 学生姓名 吴威宗指导教师李永I刚编写日期2014/6/26目录一、需求分析 二、系统运行环境 三、功能需求描述 四、模块结构图 五、数据库设计 5. 1数据库分析5. 2数据库概念设计5. 3数据库逻辑结构设计 六、程序模块设计 七、总结一、需求分析随着餐饮行业的迅速发展,现有的人工管理方式已经不能呢个满足管理者的需求,广大 餐饮业经营者已经意识到使用计算机应用软件的重要性,决定在餐饮企业的经营管理上引入计算机应用软件管理系统。酒店管理系统的大致功能:1开台点餐2菜品管理3自动结账4后台菜

2、系菜品管理5日月年结账报表6用户设置根据需求分析,本系统采用的语言:(1)本系统采用 Java 语言, Java 是目前使用最为广泛的计算机语言之一。它具有简单, 面向对象,稳定,与平台无关等特点。说他简单,并不是说这门语言很干瘪,而是一种清楚 更容易理解的方式实现程序。 面向对象是基于对象的变成更符合人的思维方式, 使人们更容 易编写程序。(2)本系统还采用SQL语言,SQL Server具有许多显着优点:易用性、适合分布组织 的可伸缩性、用于决策支持的数据仓库功能、与许多其他服务器软件紧密关联的集成性、良 好的性价比等。(3)本系统有效的利用Java和SQL的优点。、系统运行环境操作系统为

3、 Windows7、windows XP或windows 2003使用的集成开发工具 Eclipse 数 据库采用SQL Server2008,项目运行环境为JDK 7。三、功能需求描述1 开台签单工作区的功能:主要功能有开台、点菜、加菜、签单、查看开台信息和签单 信息。2 自动结账工作区的功能:一个功能是自动计算当前选中餐台的消费金额;另一个功能 是在结账时自动计算找零金额。3 结账报表工作区功能:日结帐报表,月结账报表,年结账报表。 4后天管理工作区功能:管理添加信息四、模块结构图模块结构图五、数据库设计5 1 数据库分析酒店管理系统的需求包括开台点菜功能、智能化获取菜品功能、 自动结账功

4、能、 营业额报表功能等。 在这些功能总主要涉及的数据表包括 台号表、菜品表、消费单表; 为了使系统更加的完善, 还需要为菜品分类, 即需要用到菜系表; 为了实现菜品的日销售情况统计, 还要建立一个消费 项目表,用来记录消费单消费的菜品。5 2 数据库概念设计数据库设计是系统设计过程中的重要组成部分,它是通过管理系 统的整天需求而制定的,数据库设计的好坏直接影响到系统的后期开发。 53 数据库逻辑结构设计台号表菜品表菜系表消费单表消费项目表管理员表六、程序模块设计功能模块整体设计:用户功能界面:代码:public class LandFrame extends JFrame private JP

5、asswordField passwordField;etResource();dd(panel, ;ddActionListener(new UsernameComboBoxActionListener();etResource();etResource();etResource();etResource();(new ImageIcon(resetUrl);URL resetOverUrl = ().getResource( );(new ImageIcon();URL resetPressedUrl = ().getResource(Illi);(new ImageIcon(resetP

6、ressedUrl);(new ResetButtonActionListener();(resetButton);final JButton exitButton = new JButton();(new Insets(0, 0, 0, 0);(false);(false);URL exitUrl = ().getResource();(new ImageIcon(exitUrl);URL exitOverUrl = ().getResource();(new ImageIcon(exitOverUrl);URL exitPressedUrl = ().getResource();(new

7、ImageIcon(exitPressedUrl);(new ExitButtonActionListener();(exitButton);UserNameOfNotFreeze();if () = 0) (TSoft); else for (int i = 0; i (); i+) (i);class UsernameComboBoxActionListener implements ActionListener public void actionPerformed(ActionEvent e) String userName = (String) ();if (TSoft)class

8、PasswordFieldFocusListener implements FocusListener public void focusGained(FocusEvent e) ();public void focusLost(FocusEvent e) char passwords = ();String password = turnCharsToString(passwords);if () = 0) );class ExitButtonActionListener implements ActionListener public void actionPerformed(Action

9、Event arg0) (0);class ResetButtonActionListener implements ActionListener public void actionPerformed(ActionEvent arg0) (0););class LandButtonActionListener implements ActionListener public void actionPerformed(ActionEvent e) String username = ().toString();UserByName(username);oString();rim();数据库连接

10、代码:public class JDBC private String dbUserName=root; private String dbPassword=123456; /*获取数据库连接*/public Connection getCon() throws Exception(jdbcName);Connection con=(JDBC, dbUserName,dbPassword); return con;/* 关闭数据库连接* */public void closeCon(Connection con) throws Exception if(con!=null)();public

11、static void main(Stringargs)JDBC JDBC =new JDBC() ;try (); catch (Exception e) etDefaultRenderer(columnClass); etDefaultRenderer(); etLayout(new GridBagLayout(); setModal(true); setTitle( 修改密码 );Dimension screenSize = ().getScreenSize(); setBounds( - 300) / 2, - 200) / 2, 300, 200);final JLabel oldP

12、asswordLabel = new JLabel(); ( 原 密 码: );final GridBagConstraints gridBagConstraints_7 = new GridBagConstraints();= 0;= 0;getContentPane().add(oldPasswordLabel, gridBagConstraints_7); oldPasswordField = new JPasswordField();( );(new FocusListener() public void focusGained(FocusEvent e) ();public void

13、 focusLost(FocusEvent e) char passwords = ();String password = turnCharsToString(passwords); if () = 0) ( ););(25);final GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();= 3;= 0;= 1; getContentPane().add(oldPasswordField, gridBagConstraints_8); final JLabel newPasswordLabel = new J

14、Label();( 新 密 码: );final GridBagConstraints gridBagConstraints = newGridBagConstraints(); = new Insets(10, 0, 0, 0);= 1;= 0; getContentPane().add(newPasswordLabel, gridBagConstraints);newPasswordField = new JPasswordField(););(new FocusListener() public void focusGained(FocusEvent e) public void foc

15、usLost(FocusEvent e) char passwords = ();String password = turnCharsToString(passwords);if () = 0) ); );(25);final GridBagConstraints gridBagConstraints_1 = newGridBagConstraints();= new Insets(10, 0, 0, 0);= 3;= 1;= 1;getContentPane().add(newPasswordField, gridBagConstraints_1); final JLabel repeat

16、PasswordLabel = new JLabel();( 重新输入: );final GridBagConstraints gridBagConstraints_2 = newGridBagConstraints();= new Insets(10, 0, 0, 0);= 2;= 0;getContentPane().add(repeatPasswordLabel, gridBagConstraints_2); repeatPasswordField = new JPasswordField(););(new FocusListener() public void focusGained(

17、FocusEvent e) public void focusLost(FocusEvent e) char passwords = ();String password = turnCharsToString(passwords); if () = 0) ););(25);final GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();= 3;= new Insets(10, 0, 0, 0);= 2;= 1;getContentPane().add(repeatPasswordField, gridBagCo

18、nstraints_3);final JLabel label = new JLabel();(new Dimension(30, 20);final GridBagConstraints gridBagConstraints_6 = newGridBagConstraints();= 3;= 1;getContentPane().add(label, gridBagConstraints_6);final JButton submitButton = new JButton();(new ActionListener() public void actionPerformed(ActionE

19、vent e) char oldPasswords = ();String oldPassword = turnCharsToString(oldPasswords);char newPasswords = ();String newPassword = turnCharsToString(newPasswords); char repeatPasswords = ();String repeatPassword = turnCharsToString(repeatPasswords);if () = 0 | () = 0| () = 0) (null, 请输入密码! , 友情提示,););)

20、;return;String password = (5).toString();if (password) if (repeatPassword) String username = (1).toString(); (5, newPassword);(username, newPassword);(null, 密码修改成功! , 友情提示 dispose(); else (null, 您两次输入的新密码不一致, 请确认后重新输入!友情提示 ,();II);); else (null,II您输入的原密码错误,请确认后重新输入! 友情提示 , ;IIII);IIIIIIII);););( 确定

21、);final GridBagConstraints gridBagConstraints_4 = newGridBagConstraints();= new Insets(10, 0, 0, 0);= 3;= 2;getContentPane().add(submitButton, gridBagConstraints_4); final JButton exitButton = new JButton();(new ActionListener() public void actionPerformed(ActionEvent e) dispose(););( 退出 );final Gri

22、dBagConstraints gridBagConstraints_5 = newGridBagConstraints();= new Insets(10, 10, 0, 0);= 3;= 3;getContentPane().add(exitButton, gridBagConstraints_5); rim();public void setUser(Vector user) = user; 用户管理对话框: public class UserManagerDialog extends JDialog private MTable table;private Vector tableCo

23、lumnV;private Vector tableValueV;private DefaultTableModel tableModel;private ButtonGroup buttonGroup = new ButtonGroup();private JTextField passwordTextField;private JTextField idCardTextField; private JTextField birthdayTextField; private JTextField nameTextField; private Dao dao = ();private bool

24、ean isAdd = true;/* Launch the application* param args*/ public static void main(String args) dd(inputPanel, ; final JLabel nameLabel = new JLabel(); ( 姓 名: ); final GridBagConstraints gridBagConstraints_13 = new GridBagConstraints();= new Insets(10, 0, 0, 0); (nameLabel, gridBagConstraints_13); nam

25、eTextField = new JTextField(); (12);final GridBagConstraints gridBagConstraints = newGridBagConstraints(); = new Insets(10, 0, 0, 0);= 0;= 1; (nameTextField, gridBagConstraints); final JLabel sexLabel = new JLabel();( 性别: );final GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();= n

26、ew Insets(10, 15, 0, 0);= 0;= 2;(sexLabel, gridBagConstraints_1);final JRadioButton manRadioButton = new JRadioButton(); (manRadioButton);( 男);(true);final GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();= new Insets(10, 0, 0, 0);= 0;= 3;(manRadioButton, gridBagConstraints_2);fina

27、l JRadioButton womanRadioButton = new JRadioButton(); (womanRadioButton);( 女);final GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();= new Insets(10, 0, 0, 0);= 0;= 4;(womanRadioButton, gridBagConstraints_3);final JLabel birthdayLabel = new JLabel();( 出生日期: );final GridBagConstrain

28、ts gridBagConstraints_4 = new GridBagConstraints();= new Insets(10, 15, 0, 0);= 0;= 5;(birthdayLabel, gridBagConstraints_4); birthdayTextField = new JTextField();(20);final GridBagConstraints gridBagConstraints_5 = new GridBagConstraints();= new Insets(10, 0, 0, 0);= 0;= 6;(birthdayTextField, gridBa

29、gConstraints_5);final JLabel passwordLabel = new JLabel(); ( 登录密码: );final GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();= new Insets(5, 0, 0, 0);= 1;= 0;(passwordLabel, gridBagConstraints_8); passwordTextField = new JTextField();(33);final GridBagConstraints gridBagConstraints_

30、9 = new GridBagConstraints();= 4;一 J= new Insets(5, 0, 0, 0);= 1;= 1;(passwordTextField, gridBagConstraints_9);final JLabel idCardLabel = new JLabel();( 身份证号: );final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();= new Insets(5, 16, 0, 0);= 1;= 5;(idCardLabel, gridBagConstraints

31、_6); idCardTextField = new JTextField(); (20);final GridBagConstraints gridBagConstraints_7 = new GridBagConstraints();= new Insets(5, 0, 0, 0);= 1;= 6;(idCardTextField, gridBagConstraints_7);final JPanel buttonPanel = new JPanel();final GridBagConstraints gridBagConstraints_10 = new GridBagConstrai

32、nts();一 J= new Insets(5, 0, 10, 0);= 7;= 2;= 0;(buttonPanel, gridBagConstraints_10);final JButton subButton = new JButton();(new ActionListener() public void actionPerformed(ActionEvent e) String values = new String6; values0 = ();values1 = () ? 男 : 女 );values2 = ();values3 = ();values4 = ();values5 = 正常 ; if (values0.length() 4) (null, 姓名最多只能为 4 个汉字! , 友情提示 , ;();();return;if (!(0-94-0-91,2-0-91,2, values2)

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论