欢迎来到天天文库
浏览记录
ID:40214958
大小:210.00 KB
页数:32页
时间:2019-07-26
《电影院售票管理系统》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实用文档packageutil;importjava.io.FileOutputStream;importjava.io.IOException;importjavax.xml.parsers.DocumentBuilder;importjavax.xml.parsers.DocumentBuilderFactory;importjavax.xml.parsers.ParserConfigurationException;importjavax.xml.transform.OutputKeys;importjavax.xml.transform.Tran
2、sformer;importjavax.xml.transform.TransformerFactory;importjavax.xml.transform.dom.DOMSource;importjavax.xml.transform.stream.StreamResult;importorg.w3c.dom.Document;importorg.w3c.dom.Element;importorg.w3c.dom.NodeList;importorg.xml.sax.SAXException;publicclassDomUtil{publicstati
3、cDocumentgetDocument(StringfileAddress){Documentdoc=null;try{DocumentBuilderFactorydbf=DocumentBuilderFactory.newInstance();DocumentBuilderdb=dbf.newDocumentBuilder();doc=db.parse(fileAddress);}catch(Exceptione){e.printStackTrace();}if(doc!=null)returndoc;elsereturnnull;}publicst
4、aticvoidsaveDocument(Documentdoc,StringfileAddress){//保存try{TransformerFactorytf=TransformerFactory.newInstance();Transformert=tf.newTransformer();DOMSourcedoms=newDOMSource(doc);//获得数据源//设置字符编码类型t.setOutputProperty(OutputKeys.ENCODING,"UTF-8");StreamResultresult=newStreamResult(
5、newFileOutputStream(fileAddress));t.transform(doms,result);文案大全实用文档}catch(Exceptione){e.printStackTrace();}}}packagetest;importservice.impl.Login;publicclassStart{publicstaticvoidmain(String[]args){newLogin().start();}}packageservice;publicinterfaceUserService{publicvoidmenu();//
6、查看全部电影publicvoidgetAll();//通过电影名称查询电影publicvoidgetByName();//通过放映时间查询电影publicvoidgetByItem();//购买普通票publicvoidbyTicket();//购买学生折扣票publicvoidbyDiscount();//购买免费票优惠券publicvoidbyFree();}packageservice;publicinterfaceAdminService{//菜单publicvoidmenu();//查看所有publicvoidgetAll();//添加电影pu
7、blicvoidaddFilm();//删除电影publicvoiddelFilm();//更新电影文案大全实用文档publicvoidupFilm();//售票查询publicvoidgetTicket();}packageservice.impl;importjava.util.ArrayList;importjava.util.List;importjava.util.Scanner;importdao.impl.FilmDaoImpl;importentity.Film;importentity.Seat;importservice.UserSe
8、rvice;publicclassUserLoginimplementsUser
此文档下载收益归作者所有