简体   繁体   English

如何为NetBeans编写电影预订应用程序代码

[英]How to write a Movie Booking application codes for netbeans

Design a Movie Booking application that 设计一个电影预订应用程序

  1. Allows user to browse movie listing (of at least 10 movies) with image and description; 允许用户浏览带有图像和描述的电影列表(至少10部电影);
  2. When user selects a movie, show him the seats available; 用户选择电影时,请向他展示可用的座位;
  3. User may choose the seats by clicking on them; 用户可以通过点击选择座位;
  4. User may de-select a seat by clicking on a selected seat; 用户可以通过单击所选座位来取消选择座位;
  5. When user clicks a “Book” button, display his booking info and total price; 当用户单击“预订”按钮时,显示其预订信息和总价;
  6. When user clicks “OK”, update the record and the seats will not be available to subsequent user. 当用户单击“确定”时,更新记录,并且后续用户将无法使用座位。

From your requirements I deduce that you're project is just a simple database application with a graphical user interface. 根据您的需求,我推断您只是一个带有图形用户界面的简单数据库应用程序。

For that purpose I recommend the following. 为此,我建议以下内容。

  1. Learn about databases and SQL, how to define tables, select data, store and retrieve photos, etc. Put and special emphasis on JDBC , since this would be done in java. 了解数据库和SQL,如何定义表,选择数据,存储和检索照片等。特别注意JDBC ,因为这将在Java中完成。 You're first step could very well be to define a database squema. 您的第一步很可能是定义数据库队列。
  2. Learn about Swing, how to define your GUI, how to react to GUI events, such as clicking a button, etc. Here is a good begginers toturial, that will help you to get the GUI part of your project ready. 了解Swing,如何定义GUI,如何对GUI事件(例如单击按钮)做出反应。 是一个很好的入门指南,将帮助您准备好项目的GUI部分。

Do the interface first. 首先做界面。 I wouldn't even bother with the DB to begin with. 首先,我什至不理会数据库。 I would simply have a simple array with the movie title and the start times. 我只需要一个带有电影标题和开始时间的简单数组即可。

The DB would be the last thing I would recommend attempting. 数据库将是我建议尝试的最后一件事。

Really though if you are attempting this part of the course already and you don't know the basics of Java & Swing then you should make sure you turn up to lectures first! 确实,尽管如果您已经尝试了本课程的这一部分,并且您不了解Java和Swing的基础知识,那么您应该确保首先参加讲座!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM