NIIT课程设计报告.doc_第1页
NIIT课程设计报告.doc_第2页
NIIT课程设计报告.doc_第3页
NIIT课程设计报告.doc_第4页
NIIT课程设计报告.doc_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

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

文档简介

NIIT-3综合训练报告专业软件工程(NIIT)学生姓名班级计算机124学号完成日期2015.1.30信息工程学院一设计题目基于Web的HiFi视频库管理系统的设计与开发二主要内容当前系统:HIFI Video Library 提供手册目录,当客户访问商店请求所需视频时柜台工作人员查找视频以提供给客户。然后客户在柜台付款。存在一下问题: 员工需要花很长时间搜索所需视频。 客户需要排长队付款。 客户需要访问视频库或读报纸来了解上映的影片。同时必须执行一下任务: 通过查看记录计算每日收藏。 更新所有视频及其数量列表。 通过单独查看每日记录检查每月收藏。预想系统:根据关键字观察,管理层决定启动网站,以便客户在线检查是否有所需视频,进而通过Internet进行购买。能够满足一下要求: 需要创建支持internet的应用程序。 应创建中央数据库以存储一下信息: 视频库现存视频列表。 请求购买视频列表。 雇员列表。 客户列表。此应用程序应供以一下几种类型的用户访问: 客户: 可以查看和购买视频。 雇员:可以查看现有视频列表和特定时期的销售报告。三课题设计的基本思想,原理和算法描述系统架构要满足上述要求,系统需要遵循三层方法及其MVC设计模式。 表示层:该层由用于接受和查看数据的网页组成。 业务逻辑层:该层包含用于管理数据的代码。 数据层:该层由存储相关的数据的Derby数据库组成。需要在系统中创建一下网页: Home: 显示最新影片相关信息。它包含导航到其他网页的链接,例如CustomerLogin, Registration, ContactUs, AboutUs和EmployeeLogin.About Us:显示HIFI Video Library相关信息。Registration:允许客户通过提供一下信息进行注册: 电子邮件 ID 客户名称 密码EmployeeLogin: 允许雇员通过使用其用户名和密码登陆到系统。为雇员提供一下功能: Log on: 例行执行登陆,以验证用户名和密码。 Reset: 重置网页。CustomerLogin:允许客户通过邮件和密码登陆到系统。为客户提供一下功能: Log on : 例行执行登陆,以验证邮件和密码。 Reset: 重置网页。 Register new user : 允许新客户注册。PlaceOrder: 视频名称、 购买日期、 电影名称、 歌手、 主演名称、 支付金额、 现有数量、 所需数量、 信用卡号 SalesReport : 购买日期、 视频名称、 数量、 价格、 金额 VideoDetails: 电影名称 现有数量 主角名称 歌手 价格四、课设的代码及相关运行界面:Home Page : HiFi Video Library Welcome to HiFi Video Library The Portal is committed to disseminate major information about the Library for quick reference. Video Message It gives us immense pleasure in welcoming you to the Web Portal of HiFi Video Library, California, and to extend our best wishes for success in all your academic endeavors. Mission Statement Established and incorporated for the encouragement of inter-disciplinary higher Education and Research. Dedicated to spread the knowledge to every part of its jurisdiction. University is open to all races / classes / castes and creeds. Registraition登陆页面: HiFi Video Library HiFi Video Library Registration Form CustomerName: E-mail Id: Password: registrationForm代码:import java.util.regex.Matcher;import java.util.regex.Pattern;import javax.faces.application.FacesMessage;import ponent.UIComponent;import javax.faces.context.FacesContext;import javax.faces.validator.ValidatorException;public class registrationForm private String customerName; private String emailID; private String password; /* Creates a new instance of RegistrationForm */ public registrationForm() /* * return the firstName */ public String getCustomerName() return customerName; public void setCustomerName(String customerName) this.customerName = customerName; public String getEmailID() return emailID; public void setEmailID(String emailID) this.emailID = emailID; public String getPassword() return password; public void setPassword(String password) this.password = password; public void validateEmail(FacesContext fc, UIComponent c, Object value)throws ValidatorException String email= (String)value; Pattern mask = null; mask = Ppile(.+.+.a-z+); Matcher matcher = mask.matcher(email); if (!matcher.matches() FacesMessage message = new FacesMessage(); message.setDetail(Invalid e-mail ID); message.setSummary(Invalid e-mail ID); throw new ValidatorException(message); public void validateName(FacesContext fc, UIComponent c, Object value) if ( (String)value).contains(!)|(String)value).contains()|(String)value).contains(#)|(String)value).contains($)|(String)value).contains(%)|(String)value).contains(&)|(String)value).contains(*)throw new ValidatorException( new FacesMessage(Name cannot contain special characters); 当用户注册成功时,会转到Success页面,告知用户注册成功,并可以点击进入购买Video页面,具体代码如下: Success Page HiFi Video Library Welcome     You have successfully registered with our website. Your User ID is:  EmployeeLogin页面: Welcome to HiFi Video Employee Name: User Id: Password: 创建Employee数据库,并连接:public class HibernateUtil private static final SessionFactory sessionFactory; static try / Create the SessionFactory from standard (hibernate.cfg.xml) / config file. sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); catch (Throwable ex) / Log the exception. System.err.println(Initial SessionFactory creation failed. + ex); throw new ExceptionInInitializerError(ex); public static SessionFactory getSessionFactory() return sessionFactory; public class Employee implements java.io.Serializable private String userid; private String employeename; private String password; public Employee() public Employee(String userid) this.userid = userid; public Employee(String userid, String employeename, String password) this.userid = userid; this.employeename = employeename; this.password = password; public String getUserid() return this.userid; public void setUserid(String userid) this.userid = userid; public String getEmployeename() return this.employeename; public void setEmployeename(String employeename) this.employeename = employeename; public String getPassword() return this.password; public void setPasswo

温馨提示

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

评论

0/150

提交评论