




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
研发项目总结报告模板项目总结报告项目编号项目名称LPDT1项目情况综述简要介绍项目所开发的产品在产品线路标规划中的位置、主要的功能等情况;项目目标从进度、产品需求、质量等方面说明。2管理总结1计划制定与监控计划与实际工期对比图;累计计划偏移率;估计工作量与实际对比图;各阶段工作量比率;交付件完成率;交付件延期原因分布等风险管理风险管理表;风险规避措施实行情况需求管理需求跟踪和实现情况;需求变更和影响情况物料管理成本达成情况和分析23453技术总结关键技术的实现或突破;重大技术问题4测试总结1缺陷分析及说明缺陷汇总分析图系统测试总结Beta测试总结试生产总结2345各部门总结6其它(沟通、评审、供应商管理等等)201*-4-22Companyconfidential1/项目总结报告7综述总的做的比较好的地方、存在的问题和改进建议201*-4-22Companyconfidential2/扩展阅读软件项目开发总结报告模版武汉理工大学《软件开发工具》论文报告火车票系统的开发1引言随着人们生活水平和经济水平的提高,网络科技的全球化的发展,出游和出差的频率越来越多。这大大的激发了交通水平的发展。其中,火车这种又方便有便宜的交通工具作为人们的首选,火车站的客运列车增加,客运量也随之增加。原有的售票的方式已经不再能满足旅客的需求了。为了方便旅客售票系统不仅仅只能售票也能够了解列车的各种信息。这样才能成为现在网络社会的真的适应者。2需求分析该售票系统是融合了火车票销售、退票、列车管理、车票管理、售票员管理、列车管理信息,以及售票信息查询为一体的综合系统。该系统主要编写的功能是列车和售票信息的查询及售票功能。1用户该系统主要有两类用户管理员和售票员。管理员主要工作有车次管理,车票管理和售票员管理。对于每项功能都有添加,删除和修改的功能。售票的主要工作是售票和退票。2主要功能该系统从功能方面可以分为四个方面登录。不管你是管理员还是售票员必须登录以后才可以进行系统允许的操作。当然要登录的管理员和售票员都必须是再数据库中已经发布的。基本设置该模块主要是修改售票员的相关信息,修改列车的相关信息和修改车票的相关信息。这一块的功能只有管理员才可以操作。其他的售票员是不可以对他进行操作的。售票和退票这部分工作主要是售票员来操作的。售票员根据买票人员提出的要求进行查询。查询的方式有两种一是根据车次查询;一是根据目的地来查询。退票主要是将已经出售的车票在列车开出之前再一次的返回到数据库中,并继续出售。列车和车票查询;当需要查询列车信息或者是车票信息是所做的操作。3基本流程武汉理工大学《软件开发工具》论文报告3开发过程1内容该程序包括三个部分数据库的设计、通用模块的实现、各个模块的实现。1数据库的设计将本系统所需的所有的数据都存储到数据库中。需要在数据库中管理员表、售票员表、列车信息表和车票信息表。如图所示武汉理工大学《软件开发工具》论文报告管理员表售票员表列车信息表武汉理工大学《软件开发工具》论文报告车票信息表2通用模块的实现通用模块为了减少代码的重复。在该系统中,对经常使用的操作进行封装,如将多次需要调用的数据库和操作数库的增、删、改和查等操作进行封装。使代码有很好的重用性,即使出现错误也很容易调试。如本程序中的Conn.javaimportjava.sql.*;publicclassConn{privatestaticConnectioncon;privatestaticfinalStringDRIVER="com.mysql.jdbc.Driver";privatestaticfinalStringURL="jdbc:";privatestaticfinalStringNAME="root";privatestaticfinalStringPASSWORD="021702190804";static{}publicstaticConnectiongetConnection(){}publicstaticvoidcloseCon(Connectioncon){try{if(con!=null)con.close();try{con=DriverManager.getConnection(URL,NAME,PASSWORD);}catch(SQLExceptione){}returncon;e.printStackTrace();try{}Class.forName(DRIVER);e.printStackTrace();}catch(ClassNotFoundExceptione){}catch(SQLExceptione){武汉理工大学《软件开发工具》论文报告}}publicstaticvoidclosePt(PreparedStatementpt){}publicstaticvoidcloseRs(ResultSetrs){}try{}if(rs!=null)rs.close();try{}if(pt!=null)pt.close();}e.printStackTrace();}catch(Exceptione){e.printStackTrace();}catch(Exceptione){e.printStackTrace();用户登录界面的设计、主界面的设计、基本设置模块、销售及退票模块和列车及车票查询模块。用户登录模块该部分是通过设计login.java来实现的。这部分代码的作用是用户首先选择自己的登录的是管理员还是售票员,然后输入账号和密码。单击登录,用户先判断用户登录的类型,然后给sql变量赋SQL语句值,系统调用DAO.java类的login()传入sql变量。.Login代码是importorg.eclipse.swt.SWT;importorg.eclipse.swt.events.*;importorg.eclipse.swt.graphics.Image;importorg.eclipse.swt.layout.*;importorg.eclipse.swt.widgets.*;importcom.huizhi.dao.DAO;publicclassLogin{privateTextnameText;privateTextpassText;privateCombocombo;privateStringtype;privateDisplaydisplay=newDisplay();privateShellshell=newShell(display);publicLogin(){FormLayoutlayout=newFormLayout();武汉理工大学《软件开发工具》论文报告layout.marginHeight=40;layout.marginWidth=40;shell.setLayout(layout);shell.setText("login");Imageimage=newImage(display,"jpg");shell.setBackgroundImage(image);setUIControl();shell.pack();shell.open();while(!shell.isDisposed()){if(!display.readAndDispatch())display.sleep();}display.dispose();}privatevoidsetUIControl(){Labelusername=newLabel(shell,SWT.NONE);username.setText("username");nameText=newText(shell,SWT.SINGLE|SWT.BORDER);Labelpassword=newLabel(shell,SWT.NONE);password.setText("password");passText=newText(shell,SWT.SINGLE|SWT.BORDER|SWT.PASSWORD);//passText.setEchoChar("*");Labelselect=newLabel(shell,SWT.NONE);select.setText("select");Buttonsubmit=newButton(shell,SWT.PUSH);submit.setText("login");submit.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){type=combo.getText();Stringname=nameText.getText();Stringpass=passText.getText();Stringsql=null;booleanflag=false;MessageBoxbox=newMessageBox(shell,SWT.OK);if("".equals(type)||"".equals(name)||"".equals(pass)){}box.setMessage("pleaseinputalltheinformation");box.open();return;武汉理工大学《软件开发工具》论文报告DAOdao=newDAO();if("users".equals(type)){sql="select*fromuserswhereusername=""+name+""andpassword=""+pass+""";}elseif("admin".equals(type)){sql="select*fromadminwhereusername=""+name+""andpassword=""+pass+""";}flag=dao.login(sql);if(flag){shell.dispose();newMain(type);}else{}box.setMessage("wrongnameorpassword");box.open();}});Buttonreset=newButton(shell,SWT.PUSH);reset.setText("cancel");Stringvalue[]=;combo=newCombo(shell,SWT.DROP_DOWN);combo.setItems(value);FormDatadata=newFormData();data.top=newFormAttachment(30,0);username.setLayoutData(data);data=newFormData();data.top=newFormAttachment(username,0,SWT.CENTER);data.left=newFormAttachment(username,10,SWT.RIGHT);nameText.setLayoutData(data);data=newFormData();data.top=newFormAttachment(select,0,SWT.CENTER);data.left=newFormAttachment(select,10,SWT.RIGHT);combo.setLayoutData(data);data=newFormData();data.top=newFormAttachment(username,10,SWT.BOTTOM);password.setLayoutData(data);武汉理工大学《软件开发工具》论文报告data=newFormData();data.top=newFormAttachment(password,0,SWT.CENTER);data.left=newFormAttachment(nameText,0,SWT.LEFT);passText.setLayoutData(data);data=newFormData();data.top=newFormAttachment(password,10,SWT.BOTTOM);submit.setLayoutData(data);data=newFormData();data.top=newFormAttachment(submit,0,SWT.CENTER);data.left=newFormAttachment(submit,20,SWT.RIGHT);reset.setLayoutData(data);}publicstaticvoidmain(String[]args){newLogin();}}DAO.java的login()代码publicbooleanlogin(Stringsql){booleanflag=false;con=Conn.getConnection();try{pt=con.prepareStatement(sql);rs=pt.executeQuery();if(rs.next()){flag=true;}}catch(SQLExceptione){e.printStackTrace();}finally{Conn.closeRs(rs);}Conn.closePt(pt);Conn.closeCon(con);returnflag;}图示为;武汉理工大学《软件开发工具》论文报告实现主界面importorg.eclipse.swt.*;importorg.eclipse.swt.widgets.*;importorg.eclipse.swt.layout.*;importorg.eclipse.swt.events.*;publicclassMain{privateStringtype;Displaydisplay=Display.getCurrent();Shellshell=newShell(display);publicMain(Stringtype){this.type=type;shell.setText("Trainticketingsystem");shell.setLayout(newFillLayout());Menumenu=newMenu(shell,SWT.BAR);//第一个菜单MenuItembasic=newMenuItem(menu,SWT.CASCADE);basic.setText("BasicSettings");if("users".equals(type)){}basic.setEnabled(false);Menufilemenu=newMenu(shell,SWT.DROP_DOWN);MenuItemtrain=newMenuItem(filemenu,SWT.PUSH);train.setText("TrainsManagement");train.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){}newTrainManage();});MenuItemticket=newMenuItem(filemenu,SWT.PUSH);ticket.setText("TicketsManagement");武汉理工大学《软件开发工具》论文报告ticket.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newTicketManage();}});MenuItemusers=newMenuItem(filemenu,SWT.PUSH);users.setText("UsersManagement");users.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newUsersManage();}});MenuItemexit=newMenuItem(filemenu,SWT.PUSH);exit.setText("quit");basic.setMenu(filemenu);exit.addSelectionListener(newSelectionAdapter(){}publicvoidwidgetSelected(SelectionEvente){display.dispose();});//第二个菜单MenuItemmarket=newMenuItem(menu,SWT.CASCADE);market.setText("SalesandRefunds");MenueditMenu=newMenu(shell,SWT.DROP_DOWN);MenuItemmarketItem=newMenuItem(editMenu,SWT.PUSH);marketItem.setText("SalesTickets");marketItem.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newXiaosTicket();}});MenuItemrefundItem=newMenuItem(editMenu,SWT.PUSH);refundItem.setText("RefundsTickets");market.setMenu(editMenu);refundItem.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newTuiTicket();}});//第三个菜单MenuItemfind=newMenuItem(menu,SWT.CASCADE);find.setText("TrainsandTicketsquery");MenutaiMenu=newMenu(shell,SWT.DROP_DOWN);MenuItemtrainFind=newMenuItem(taiMenu,SWT.PUSH);武汉理工大学《软件开发工具》论文报告trainFind.setText("Trainsquery");trainFind.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newFindTrain();}});MenuItemticketFind=newMenuItem(taiMenu,SWT.PUSH);ticketFind.setText("Ticketquery");find.setMenu(taiMenu);ticketFind.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newFindTicket();}});shell.setMenuBar(menu);shell.setSize(500,400);shell.open();while(!shell.isDisposed()){if(!display.readAndDispatch())display.sleep();}display.dispose();}}图示为基本设置模块包括车次管理,车票管理和售票员管理。车次管理主要是是对于列车的增加,删除和修改等操作。其中包括它的相关的信息等。它是由TrainManagement.java.代码如下importjava.util.List;武汉理工大学《软件开发工具》论文报告importorg.eclipse.swt.SWT;importorg.eclipse.swt.events.*;importorg.eclipse.swt.layout.*;importorg.eclipse.swt.widgets.*;importcom.huizhi.dao.DAO;importcom.huizhi.vo.Train;publicclassTrainManage{Displaydisplay=Display.getCurrent();Shelltmshell=newShell(display);finalTabletable=newTable(tmshell,SWT.SINGLE|SWT.H_SCROLL|SWT.V_SCROLL|SWT.H_SCROLL|SWT.BORDER|SWT.FULL_SELECTION);TrainManagetm=this;publicTrainManage(){RowLayoutrowLayout=newRowLayout();rowLayout.pack=true;rowLayout.wrap=true;rowLayout.justify=false;rowLayout.marginTop=20;tmshell.setLayout(rowLayout);finalTableColumncolumn1=newTableColumn(table,SWT.LEFT);columnsetText("TrainID");columnsetWidth(80);finalTableColumncolumn2=newTableColumn(table,SWT.LEFT);columnsetText("TrainNum");columnsetWidth(80);finalTableColumncolumn3=newTableColumn(table,SWT.LEFT);columnsetText("TrainType");columnsetWidth(80);finalTableColumncolumn4=newTableColumn(table,SWT.LEFT);columnsetText("Starting");columnsetWidth(80);finalTableColumncolumn5=newTableColumn(table,SWT.LEFT);columnsetText("startingTime");columnsetWidth(80);finalTableColumncolumn6=newTableColumn(table,SWT.LEFT);columnsetText("terminal");columnsetWidth(80);finalTableColumncolumn7=newTableColumn(table,SWT.LEFT);columnsetText("terminalTime");columnsetWidth(80);武汉理工大学《软件开发工具》论文报告finalTableColumncolumn8=newTableColumn(table,SWT.LEFT);columnsetText("iskongtiao");columnsetWidth(80);finalTableColumncolumn9=newTableColumn(table,SWT.LEFT);columnsetText("price");columnsetWidth(80);finalTableColumncolumn10=newTableColumn(table,SWT.LEFT);column10.setText("middleStation");column10.setWidth(80);finalTableColumncolumn11=newTableColumn(table,SWT.LEFT);column1setText("yzNum");column1setWidth(80);finalTableColumncolumn12=newTableColumn(table,SWT.LEFT);column1setText("rzNum");column1setWidth(80);finalTableColumncolumn13=newTableColumn(table,SWT.LEFT);column1setText("ywNum");column1setWidth(80);finalTableColumncolumn14=newTableColumn(table,SWT.LEFT);column1setText("rwNum");column1setWidth(80);table.setHeaderVisible(true);table.setLinesVisible(true);freshData();table.setSize(800,200);Buttonadd=newButton(tmshell,SWT.PUSH);add.setText("addtrains");add.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){newAddTrain(tm);}});Buttonupdate=newButton(tmshell,SWT.PUSH);update.setText("modify");update.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){TableItem[]selection=table.getSelection();TableItemselectedRow=selection[0];Traintrain=newTrain();train.setId(Integer.parseInt(selectedRow.getText(0)));train.setTrainNum(selectedRow.getText(1));train.setTrainType(selectedRow.getText(2));train.setStarting(selectedRow.getText(3));武汉理工大学《软件开发工具》论文报告train.setStartingTime(selectedRow.getText(4));train.setTerminal(selectedRow.getText(5));train.setTerminalTime(selectedRow.getText(6));train.setIskongTiao(selectedRow.getText(7));train.setPrice(Float.parseFloat(selectedRow.getText(8)));train.setMiddleStation(selectedRow.getText(9));train.setYzNum(Integer.parseInt(selectedRow.getText(10)));train.setRzNum(Integer.parseInt(selectedRow.getText(11)));train.setYwNum(Integer.parseInt(selectedRow.getText(12)));train.setRwNum(Integer.parseInt(selectedRow.getText(13)));newUpdateTrain(train,tm);}});Buttondelete=newButton(tmshell,SWT.PUSH);delete.setText("cancel");delete.addSelectionListener(newSelectionAdapter(){box=newpublicvoidwidgetSelected(SelectionEvente){MessageBoxMessageBox(tmshell,SWT.YES|SWT.NO);box.setMessage("Areyousuretocancel");intnum=box.open();if(num==128)return;TableItem[]selection=table.getSelection();TableItemselectedRow=selection[0];DAOdao=newDAO();Stringsql="deletefromtrainwhereid="+selectedRow.getText(0)+"";inti=dao.update(sql);if(i>0){box.setMessage("succeed");box.open();table.remove(table.getSelectionIndex());}else{}}});box.setMessage("failure");box.open();武汉理工大学《软件开发工具》论文报告tmshell.setSize(1200,400);tmshell.setText("trainManagement");tmshell.open();while(!tmshell.isDisposed()){if(!display.readAndDispatch())display.sleep();}tmshell.dispose();}publicvoidfreshData(){table.removeAll();try{DAOdao=newDAO();Listlist=dao.getAllTrain();intnumber=list.size();for(inti=0;i武汉理工大学《软件开发工具》论文报告e.printStackTrace();}finally{Conn.closePt(pt);Conn.closeCon(con);}returni;}publicListgetAllTrain(){Listlist=newArrayList();con=Conn.getConnection();try{pt=con.prepareStatement("select*fromtrain");rs=pt.executeQuery();while(rs.next()){Traintrain=newTrain();train.setId(rs.getInt(1));train.setTrainNum(rs.getString(2));train.setTrainType(rs.getString(3));train.setStarting(rs.getString(4));train.setStartingTime(rs.getString(5));train.setTerminal(rs.getString(6));train.setTerminalTime(rs.getString(7));train.setIskongTiao(rs.getString(8));train.setPrice(rs.getFloat(9));train.setMiddleStation(rs.getString(10));train.setYzNum(rs.getInt(11));train.setRzNum(rs.getInt(12));train.setYwNum(rs.getInt(13));train.setRwNum(rs.getInt(14));list.add(train);}}catch(SQLExceptione){e.printStackTrace();}finally{Conn.closeRs(rs);Conn.closePt(pt);Conn.closeCon(con);}returnlist;}其中的update的功能是,首先连接数据库,然后用传递过来的SQl语句在列表中删除某辆列车的信息。getAllTrain()方法是显示所有的列车的信息。图示如下武汉理工大学《软件开发工具》论文报告在车次管理中的对于列车信息添加的功能是通过AddTrain.java来实现的。代码如下importorg.eclipse.swt.SWT;importorg.eclipse.swt.events.*;importorg.eclipse.swt.layout.*;importorg.eclipse.swt.widgets.*;importcom.huizhi.dao.DAO;publicclassAddTrain{Displaydisplay=Display.getCurrent();Shelltmshell=newShell(display);TrainManagetrainmanage=null;publicAddTrain(TrainManagetm){trainmanage=tm;GridLayoutgridlayout=newGridLayout();tmshell.setText("addtrainsinformation");gridlayout.numColumns=2;gridlayout.makeColumnsEqualWidth=true;tmshell.setLayout(gridlayout);GridDatagd=newGridData(GridData.FILL_BOTH);Labell=newLabel(tmshell,SWT.LEFT);l.setText("trainNum");l.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTexttrainNum=newText(tmshell,SWT.NONE);trainNum.setSize(50,60);trainNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell1=newLabel(tmshell,SWT.LEFT);lsetText("trainType");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTexttrainType=newText(tmshell,SWT.LEFT);武汉理工大学《软件开发工具》论文报告trainType.setSize(30,40);trainType.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell2=newLabel(tmshell,SWT.LEFT);lsetText("starting");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextstarting=newText(tmshell,SWT.LEFT);starting.setSize(30,40);starting.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell3=newLabel(tmshell,SWT.LEFT);lsetText("startingtime");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextstartingTime=newText(tmshell,SWT.LEFT);startingTime.setSize(30,40);startingTime.setLayoutData(gd);Labell4=newLabel(tmshell,SWT.LEFT);lsetText("terminal");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextterminal=newText(tmshell,SWT.LEFT);terminal.setSize(30,40);terminal.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell5=newLabel(tmshell,SWT.LEFT);lsetText("terminaltime");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextterminalTime=newText(tmshell,SWT.LEFT);terminalTime.setSize(30,40);terminalTime.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell6=newLabel(tmshell,SWT.LEFT);lsetText("iskongtiao");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextiskongTiao=newText(tmshell,SWT.LEFT);武汉理工大学《软件开发工具》论文报告iskongTiao.setSize(30,40);iskongTiao.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell7=newLabel(tmshell,SWT.LEFT);lsetText("price");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextprice=newText(tmshell,SWT.LEFT);price.setSize(30,40);price.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell8=newLabel(tmshell,SWT.LEFT);lsetText("middleStation");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextmiddleStation=newText(tmshell,SWT.LEFT);middleStation.setSize(30,40);middleStation.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell9=newLabel(tmshell,SWT.LEFT);lsetText("yzNum");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextyzNum=newText(tmshell,SWT.LEFT);yzNum.setSize(30,40);yzNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell10=newLabel(tmshell,SWT.LEFT);l10.setText("rzNum");l10.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextrzNum=newText(tmshell,SWT.LEFT);rzNum.setSize(30,40);rzNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell11=newLabel(tmshell,SWT.LEFT);l1setText("ywNum");l1setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);武汉理工大学《软件开发工具》论文报告finalTextywNum=newText(tmshell,SWT.LEFT);ywNum.setSize(30,40);ywNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell12=newLabel(tmshell,SWT.LEFT);l1setText("rwNum");l1setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextrwNum=newText(tmshell,SWT.LEFT);rwNum.setSize(30,40);rwNum.setLayoutData(gd);Buttonb=newButton(tmshell,SWT.LEFT);b.setText("add");b.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){MessageBoxbox=newMessageBox(tmshell,SWT.OK);if("".equals(trainNum.getText())||"".equals(trainType.getText())||"".equals(starting.getText())||"".equals(startingTime.getText())||"".equals(terminal.getText())||"".equals(terminalTime.getText())||"".equals(iskongTiao.getText())||"".equals(price.getParent())||"".equals(middleStation.getText())||"".equals(yzNum.getText())||"".equals(rzNum.getText())||"".equals(ywNum.getText())||"".equals(rwNum.getText())){box.setMessage("pleaseinputtherightinformation");box.open();return;}DAOdao=newDAO();Stringsql="otrain(trainNum,trainType,starting1,startingTime,terminal,terminalTime,iskongTiao,price,"+"middleStation,yzNum,rzNum,ywNum,rwNum)values(""+trainNum.getText()+"",""+trainType.getText()+"",""+starting.getText()+"","+"""+startingTime.getText()+"",""+terminal.getText()+"",""+terminalTime.getText()+"",""+iskongTiao.getText()+"","+武汉理工大学《软件开发工具》论文报告"""+price.getText()+"",""+middleStation.getText()+"",""+yzNum.getText()+"",""+rzNum.getText()+"",""+ywNum.getText()+"",""+rwNum.getText()+"")";inti=dao.update(sql);}if(i>0){box.setMessage("add");}box.open();fresh();});Buttonb1=newButton(tmshell,SWT.LEFT);bsetText("quit");baddSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){tmshell.setVisible(false);}});tmshell.layout();tmshell.setSize(500,450);tmshell.open();while(!tmshell.isDisposed()){if(!display.readAndDispatch())display.sleep();}tmshell.dispose();}publicvoidfresh(){trainmanage.freshData();}}图示为武汉理工大学《软件开发工具》论文报告修改列车功能是在UpdateTrain.java.类中实现的。代码如下importorg.eclipse.swt.SWT;importorg.eclipse.swt.events.*;importorg.eclipse.swt.layout.*;importorg.eclipse.swt.widgets.*;importcom.huizhi.dao.DAO;importcom.huizhi.vo.Train;publicclassUpdateTrain{privateTraintrain;Displaydisplay=Display.getCurrent();Shellutrainshell=newShell(display);TrainManagetrainmanage=null;publicUpdateTrain(Traintrain,TrainManagetm){this.trainmanage=tm;this.train=train;GridLayoutgridlayout=newGridLayout();utrainshell.setText("modifytraininformation");gridlayout.numColumns=2;gridlayout.makeColumnsEqualWidth=true;utrainshell.setLayout(gridlayout);武汉理工大学《软件开发工具》论文报告GridDatagd=newGridData(GridData.FILL_BOTH);Labelll=newLabel(utrainshell,SWT.LEFT);ll.setText("trainID");ll.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextnum=newText(utrainshell,SWT.NONE);num.setText(Integer.toString(train.getId()));num.setEnabled(false);num.setSize(50,60);num.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell=newLabel(utrainshell,SWT.LEFT);l.setText("TrainNum");l.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTexttrainNum=newText(utrainshell,SWT.NONE);trainNum.setText(train.getTrainNum());trainNum.setSize(50,60);trainNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell1=newLabel(utrainshell,SWT.LEFT);lsetText("TrainType");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTexttrainType=newText(utrainshell,SWT.LEFT);trainType.setText(train.getTrainType());trainType.setSize(30,40);trainType.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell2=newLabel(utrainshell,SWT.LEFT);lsetText("starting");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextstarting=newText(utrainshell,SWT.LEFT);starting.setText(train.getStarting());starting.setSize(30,40);starting.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell3=newLabel(utrainshell,SWT.LEFT);lsetText("startingTime");武汉理工大学《软件开发工具》论文报告lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextstartingTime=newText(utrainshell,SWT.LEFT);startingTime.setText(train.getStartingTime());startingTime.setSize(30,40);startingTime.setLayoutData(gd);Labell4=newLabel(utrainshell,SWT.LEFT);lsetText("terminal");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextterminal=newText(utrainshell,SWT.LEFT);terminal.setText(train.getTerminal());terminal.setSize(30,40);terminal.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell5=newLabel(utrainshell,SWT.LEFT);lsetText("terminalTime");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextterminalTime=newText(utrainshell,SWT.LEFT);terminalTime.setText(train.getTerminalTime());terminalTime.setSize(30,40);terminalTime.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell6=newLabel(utrainshell,SWT.LEFT);lsetText("iskongtiao");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextiskongTiao=newText(utrainshell,SWT.LEFT);iskongTiao.setText(train.getIskongTiao());iskongTiao.setSize(30,40);iskongTiao.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell7=newLabel(utrainshell,SWT.LEFT);lsetText("price");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextprice=newText(utrainshell,SWT.LEFT);price.setText(Float.toString(train.getPrice()));price.setSize(30,40);武汉理工大学《软件开发工具》论文报告price.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell8=newLabel(utrainshell,SWT.LEFT);lsetText("middleStation");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextmiddleStation=newText(utrainshell,SWT.LEFT);middleStation.setText(train.getMiddleStation());middleStation.setSize(30,40);middleStation.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell9=newLabel(utrainshell,SWT.LEFT);lsetText("yzNum");lsetLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextyzNum=newText(utrainshell,SWT.LEFT);yzNum.setText(Integer.toString(train.getYzNum()));yzNum.setSize(30,40);yzNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell10=newLabel(utrainshell,SWT.LEFT);l10.setText("rzNum");l10.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextrzNum=newText(utrainshell,SWT.LEFT);rzNum.setText(Integer.toString(train.getRzNum()));rzNum.setSize(30,40);rzNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell11=newLabel(utrainshell,SWT.LEFT);l1setText("ywNum");l1setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextywNum=newText(utrainshell,SWT.LEFT);ywNum.setText(Integer.toString(train.getYwNum()));ywNum.setSize(30,40);ywNum.setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);Labell12=newLabel(utrainshell,SWT.LEFT);武汉理工大学《软件开发工具》论文报告l1setText("rwNum");l1setLayoutData(gd);gd=newGridData(GridData.FILL_BOTH);finalTextrwNum=newText(utrainshell,SWT.LEFT);rwNum.setText(Integer.toString(train.getRwNum()));rwNum.setSize(30,40);rwNum.setLayoutData(gd);Buttonb=newButton(utrainshell,SWT.LEFT);b.setText("modify");b.addSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){MessageBoxbox=newMessageBox(utrainshell,SWT.OK);if("".equals(trainNum.getText())||"".equals(trainType.getText())||"".equals(starting.getText())||"".equals(startingTime.getText())||"".equals(terminal.getText())||"".equals(terminalTime.getText())||"".equals(iskongTiao.getText())||"".equals(price.getText())||"".equals(middleStation.getText())||"".equals(yzNum.getText())||"".equals(rzNum.getText())||"".equals(ywNum.getText())||"".equals(rwNum.getText())){box.setMessage("pleaseinputrightinformationthenmodify");box.open();return;}DAOdao=newDAO();Stringsql="updatetrainsettrainNum=""+trainNum.getText()+"",trainType=""+trainType.getText()+"",starting1=""+starting.getText()+"","+"startingTime=""+startingTime.getText()+"",terminal=""+terminal.getText()+"",terminalTime=""+terminalTime.getText()+"",iskongTiao=""+iskongTiao.getText()+"","+"price=""+price.getText()+"",middleStation=""+middleStation.getText()+"",yzNum=""+yzNum.getText()+"",rzNum=""+rzNum.getText()+"",ywNum=""+ywNum.getText()+"",rwNum=""+rwNum.getText()+""whereid=""+num.getText()+""";inti=dao.update(sql);if(i>0){武汉理工大学《软件开发工具》论文报告box.setMessage("succeed");box.open();fresh();}else{box.setMessage("failure");box.open();}}});Buttonb1=newButton(utrainshell,SWT.LEFT);bsetText("quit");baddSelectionListener(newSelectionAdapter(){publicvoidwidgetSelected(SelectionEvente){utrainshell.setVisible(false);}});utrainshell.layout();utrainshell.setSize(500,450);utrainshell.open();while(!utrainshell.isDisposed()){if(!display.readAndDispatch())display.sleep();}utrainshell.dispose();}publicvoidfresh(){trainmanage.freshData();}}车票管理主要包括对车票的增加,删除和修改的操作。由TicketManagement.java实现。代码类似上面的(具体看压缩包)。其中的查询列车表和售票表调用的DAO.java类中selectTicket()方法。图示为武汉理工大学《软件开发工具》论文报告售票员管理是对售票员进行增加、删除和修改进行操作。由UserMannage.java类来实现。代码类似以上。在该类中调用了DAO.java类中getAllUser()方法。图示为武汉理工大学《软件开发工具》论文报告售票及退票模块包括两部分火车售票和退票。售票系统是xiaosTickect.java实现的。图示如下退票是售票员根据用户提供的车票信息在系统中进行售票。主要是由TuiTicket.java来实现的。在该类中涉及到DAO.java类中的selectTrain()方法.图示如下:列车及车票查询系统主要功能包括两部分查询列车信息和查询车票信息.有FindTrain.Java和FindTicket.java实现.图示如下武汉理工大学《软件开发工具》论文报告4学习心得我是再没有接触eclipse之前就接触了java,我自己都先用记事本编写java程序,然后在doc下进行编译和运行。后来安装了ecplise这个集成环境,但是只把它当成一个运行java的集成环境。后来经过开发工具的学习和相关书籍的查看,开始深入的理解了什么是ecplise。其实整个ecplise体系结构就像一个大的拼图,可以不断地向
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 肿瘤护理中的有效沟通
- 直肠恶性肿瘤内科诊疗体系
- 全国中医护理骨干人才汇报
- 行政制度新人培训
- 开户云五期培训
- 护理标识管理规章制度
- 幼儿教师音乐乐理培训
- 木材采购保密及森林资源保护协议
- 车辆收费员招聘与管理服务协议
- 高端草莓采摘园与旅行社定制旅游合同范本
- 噢!苏珊娜教学设计
- 幸福心理学智慧树知到答案2024年浙江大学
- 2024年黑龙江大兴安岭中考生物试题及答案1
- 毕业研究生登记表(适用于江苏省)
- 仪器分析智慧树知到答案2024年临沂大学
- 终毛发生中的表观调控机制
- DL∕T 1917-2018 电力用户业扩报装技术规范
- 古建筑测绘智慧树知到期末考试答案章节答案2024年长安大学
- 心力衰竭药物治疗相关高钾血症防治专家共识
- JT-T-496-2018公路地下通信管道高密度聚乙烯硅芯塑料管
- 2-2-1正常新生儿的特点及疾病预防的正常新生儿的特点
评论
0/150
提交评论