項目開發(fā)總結報告模板
十、項目開發(fā)總結報告
項目開發(fā)總結報告
1.引言.............................................................................................................................................1
1.1編寫目的............................................................................................................................11.2項目背景............................................................................................................................11.3定義....................................................................................................................................11.4參考資料............................................................................................................................22.開發(fā)結果.....................................................................................................................................2
2.1產品....................................................................................................................................22.2主要功能及性能................................................................................................................22.3所用工時............................................................................................................................22.4所用機時............................................................................................................................22.5進度....................................................................................................................................22.6費用....................................................................................................................................33.評價.............................................................................................................................................3
3.1生產率評價........................................................................................................................33.2技術方案評價....................................................................................................................33.3產品質量評價....................................................................................................................34.經驗與教訓.................................................................................................................................3
1.引言
1.1編寫目的
【闡明編寫總結報告的目的,指明讀者對象!
1.2項目背景
【說明項目來源、委托單位、開發(fā)單位及主管部門!
1.3定義
【列出報告用到的專門術語的定義和縮寫詞的原文!
十、項目開發(fā)總結報告
1.4參考資料
【列出有關資料的作者、標題、編號、發(fā)表日期、出版單位或資料來源,可包括:a.項目經核準的計劃任務書、合同或上級機關的批文;b.項目開發(fā)計劃;c.需求規(guī)格說明書;d.概要設計說明書;e.詳細設計說明書;f.用戶操作手冊;g.測試計劃;h.測試分析報告;
i.本報告引用的其他資料、采用的開發(fā)標準或開發(fā)規(guī)范!
2.開發(fā)結果
2.1產品
【可包括:
a.列出各部分的程序名稱、源程序行數(包括注釋行)或目標程序字節(jié)數及程序總計數量、
存儲形式;
b.產品文檔名稱等。】
2.2主要功能及性能2.3所用工時
【按人員的不同層次分別計時!
2.4所用機時
【按所用計算機機型分別計時!
2.5進度
【給出計劃進度與實際進度的對比!
十、項目開發(fā)總結報告
2.6費用
3.評價
3.1生產率評價
【如平均每人每月生產的源程序行數、文檔的字數等!
3.2技術方案評價3.3產品質量評價
4.經驗與教訓
擴展閱讀:軟件項目開發(fā)總結報告模版
武漢理工大學《軟件開發(fā)工具》論文報告
火車票系統(tǒng)的開發(fā)
1引言
隨著人們生活水平和經濟水平的提高,網絡科技的全球化的發(fā)展,出游和出差的頻率越來越多。這大大的激發(fā)了交通水平的發(fā)展。其中,火車這種又方便有便宜的交通工具作為人們的首選,火車站的客運列車增加,客運量也隨之增加。原有的售票的方式已經不再能滿足旅客的需求了。為了方便旅客售票系統(tǒng)不僅僅只能售票也能夠了解列車的各種信息。這樣才能成為現(xiàn)在網絡社會的真的適應者。
2需求分析
該售票系統(tǒng)是融合了火車票銷售、退票、列車管理、車票管理、售票員管理、列車管理信息,以及售票信息查詢?yōu)橐惑w的綜合系統(tǒng)。該系統(tǒng)主要編寫的功能是列車和售票信息的查詢及售票功能。
2.1用戶
該系統(tǒng)主要有兩類用戶:管理員和售票員。管理員主要工作有車次管理,車票管理和售票員管理。對于每項功能都有添加,刪除和修改的功能。售票的主要工作是售票和退票。
2.2主要功能
該系統(tǒng)從功能方面可以分為四個方面:登錄。不管你是管理員還是售票員必須登錄以后才可以進行系統(tǒng)允許的操作。當然要登錄的管理員和售票員都必須是再數據庫中已經發(fā)布的;驹O置:該模塊主要是修改售票員的相關信息,修改列車的相關信息和修改車票的相關信息。這一塊的功能只有管理員才可以操作。其他的售票員是不可以對他進行操作的。售票和退票:這部分工作主要是售票員來操作的。售票員根據買票人員提出的要求進行查詢。查詢的方式有兩種:一是根據車次查詢;一是根據目的地來查詢。退票主要是將已經出售的車票在列車開出之前再一次的返回到數據庫中,并繼續(xù)出售。
列車和車票查詢;當需要查詢列車信息或者是車票信息是所做的操作。
2.3基本流程
武漢理工大學《軟件開發(fā)工具》論文報告
3開發(fā)過程
3.1內容
該程序包括三個部分數據庫的設計、通用模塊的實現(xiàn)、各個模塊的實現(xiàn)。
3.1.1數據庫的設計:
將本系統(tǒng)所需的所有的數據都存儲到數據庫中。需要在數據庫中管理員表、
售票員表、列車信息表和車票信息表。如圖所示:
武漢理工大學《軟件開發(fā)工具》論文報告
管理員表:
售票員表:
列車信息表:
武漢理工大學《軟件開發(fā)工具》論文報告
車票信息表:
3.1.2通用模塊的實現(xiàn):
通用模塊為了減少代碼的重復。在該系統(tǒng)中,對經常使用的操作進行封裝,如將多次需要調用的數據庫和操作數庫的增、刪、改和查等操作進行封裝。使代碼有很好的重用性,即使出現(xiàn)錯誤也很容易調試。如本程序中的Conn.java
importjava.sql.*;publicclassConn{
privatestaticConnectioncon;
privatestaticfinalStringDRIVER="com.mysql.jdbc.Driver";
privatestaticfinalStringURL="jdbc:mysql://localhost:3306/newdatabase";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){
武漢理工大學《軟件開發(fā)工具》論文報告
}}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來實現(xiàn)的。這部分代碼的作用是用戶首先選擇自己的登錄的是管理員還是售票員,然后輸入賬號和密碼。單擊登錄,用戶先判斷用戶登錄的類型,然后給sql變量賦SQL語句值,系統(tǒng)調用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();
武漢理工大學《軟件開發(fā)工具》論文報告
layout.marginHeight=40;
layout.marginWidth=40;shell.setLayout(layout);shell.setText("login");
Imageimage=newImage(display,"2.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;
武漢理工大學《軟件開發(fā)工具》論文報告
DAOdao=newDAO();
if("users".equals(type)){sql="select*fromuserswhereusername=""+name+""andpassword=""+pass+""";}elseif("admin".equals(type)){
sql="select*fromadminwhereusername=""+name+""and
password=""+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[]={"users","admin"};
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);
武漢理工大學《軟件開發(fā)工具》論文報告
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;}圖示為;
武漢理工大學《軟件開發(fā)工具》論文報告
實現(xiàn)主界面:
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");
武漢理工大學《軟件開發(fā)工具》論文報告
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);
武漢理工大學《軟件開發(fā)工具》論文報告
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;
武漢理工大學《軟件開發(fā)工具》論文報告
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);column1.setText("TrainID");
column1.setWidth(80);
finalTableColumncolumn2=newTableColumn(table,SWT.LEFT);column2.setText("TrainNum");column2.setWidth(80);
finalTableColumncolumn3=newTableColumn(table,SWT.LEFT);column3.setText("TrainType");column3.setWidth(80);
finalTableColumncolumn4=newTableColumn(table,SWT.LEFT);column4.setText("Starting");
column4.setWidth(80);
finalTableColumncolumn5=newTableColumn(table,SWT.LEFT);column5.setText("startingTime");
column5.setWidth(80);
finalTableColumncolumn6=newTableColumn(table,SWT.LEFT);column6.setText("terminal");column6.setWidth(80);
finalTableColumncolumn7=newTableColumn(table,SWT.LEFT);column7.setText("terminalTime");column7.setWidth(80);
武漢理工大學《軟件開發(fā)工具》論文報告
finalTableColumncolumn8=newTableColumn(table,SWT.LEFT);column8.setText("iskongtiao");column8.setWidth(80);
finalTableColumncolumn9=newTableColumn(table,SWT.LEFT);column9.setText("price");
column9.setWidth(80);
finalTableColumncolumn10=newTableColumn(table,SWT.LEFT);column10.setText("middleStation");column10.setWidth(80);
finalTableColumncolumn11=newTableColumn(table,SWT.LEFT);column11.setText("yzNum");column11.setWidth(80);
finalTableColumncolumn12=newTableColumn(table,SWT.LEFT);column12.setText("rzNum");
column12.setWidth(80);
finalTableColumncolumn13=newTableColumn(table,SWT.LEFT);column13.setText("ywNum");column13.setWidth(80);
finalTableColumncolumn14=newTableColumn(table,SWT.LEFT);column14.setText("rwNum");column14.setWidth(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));
武漢理工大學《軟件開發(fā)工具》論文報告
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=new
publicvoidwidgetSelected(SelectionEvente){MessageBox
MessageBox(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="delete
from
train
where
id="+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();
武漢理工大學《軟件開發(fā)工具》論文報告
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武漢理工大學《軟件開發(fā)工具》論文報告
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()方法是顯示所有的列車的信息。圖示如下:
武漢理工大學《軟件開發(fā)工具》論文報告
在車次管理中的對于列車信息添加的功能是通過AddTrain.java來實現(xiàn)的。代碼如下:
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);l1.setText("trainType");
l1.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);
finalTexttrainType=newText(tmshell,SWT.LEFT);
武漢理工大學《軟件開發(fā)工具》論文報告
trainType.setSize(30,40);
trainType.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);Labell2=newLabel(tmshell,SWT.LEFT);l2.setText("starting");l2.setLayoutData(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);l3.setText("startingtime");l3.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);
finalTextstartingTime=newText(tmshell,SWT.LEFT);startingTime.setSize(30,40);startingTime.setLayoutData(gd);
Labell4=newLabel(tmshell,SWT.LEFT);l4.setText("terminal");l4.setLayoutData(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);l5.setText("terminaltime");
l5.setLayoutData(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);l6.setText("iskongtiao");
l6.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);
finalTextiskongTiao=newText(tmshell,SWT.LEFT);
武漢理工大學《軟件開發(fā)工具》論文報告
iskongTiao.setSize(30,40);
iskongTiao.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);Labell7=newLabel(tmshell,SWT.LEFT);l7.setText("price");l7.setLayoutData(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);l8.setText("middleStation");l8.setLayoutData(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);l9.setText("yzNum");l9.setLayoutData(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);l11.setText("ywNum");l11.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);
武漢理工大學《軟件開發(fā)工具》論文報告
finalTextywNum=newText(tmshell,SWT.LEFT);ywNum.setSize(30,40);ywNum.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);Labell12=newLabel(tmshell,SWT.LEFT);l12.setText("rwNum");
l12.setLayoutData(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();String
sql="insert
into
train(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()+"","+
武漢理工大學《軟件開發(fā)工具》論文報告
"""+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);b1.setText("quit");
b1.addSelectionListener(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();}}圖示為:
武漢理工大學《軟件開發(fā)工具》論文報告
修改列車功能是在UpdateTrain.java.類中實現(xiàn)的。代碼如下: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);
武漢理工大學《軟件開發(fā)工具》論文報告
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);l1.setText("TrainType");l1.setLayoutData(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);l2.setText("starting");
l2.setLayoutData(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);l3.setText("startingTime");
武漢理工大學《軟件開發(fā)工具》論文報告
l3.setLayoutData(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);l4.setText("terminal");l4.setLayoutData(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);l5.setText("terminalTime");
l5.setLayoutData(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);l6.setText("iskongtiao");l6.setLayoutData(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);l7.setText("price");
l7.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);
finalTextprice=newText(utrainshell,SWT.LEFT);price.setText(Float.toString(train.getPrice()));price.setSize(30,40);
武漢理工大學《軟件開發(fā)工具》論文報告
price.setLayoutData(gd);
gd=newGridData(GridData.FILL_BOTH);Labell8=newLabel(utrainshell,SWT.LEFT);l8.setText("middleStation");
l8.setLayoutData(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);l9.setText("yzNum");l9.setLayoutData(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);l11.setText("ywNum");l11.setLayoutData(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);
武漢理工大學《軟件開發(fā)工具》論文報告
l12.setText("rwNum");
l12.setLayoutData(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){
武漢理工大學《軟件開發(fā)工具》論文報告
box.setMessage("succeed");
box.open();fresh();}else{
box.setMessage("failure");box.open();}
}});
Buttonb1=newButton(utrainshell,SWT.LEFT);b1.setText("quit");
b1.addSelectionListener(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實現(xiàn)。代碼類似上面的:(具體看壓縮包)。其中的查詢列車表和售票表調用的DAO.java類中selectTicket()方法。圖示為:
武漢理工大學《軟件開發(fā)工具》論文報告
售票員管理是對售票員進行增加、刪除和修改進行操作。由UserMannage.java類來實現(xiàn)。代碼類似以上。在該類中調用了DAO.java類中getAllUser()方法。圖示為:
武漢理工大學《軟件開發(fā)工具》論文報告
售票及退票模塊包括兩部分:火車售票和退票。售票系統(tǒng)是xiaosTickect.java實現(xiàn)的。圖示如下:
退票是售票員根據用戶提供的車票信息在系統(tǒng)中進行售票。主要是由TuiTicket.java來實現(xiàn)的。在該類中涉及到DAO.java類中的selectTrain()方法.圖示如下:
列車及車票查詢系統(tǒng)主要功能包括兩部分:查詢列車信息和查詢車票信息.有FindTrain.Java和FindTicket.java實現(xiàn).圖示如下:
武漢理工大學《軟件開發(fā)工具》論文報告
4學習心得
我是再沒有接觸eclipse之前就接觸了java,我自己都先用記事本編寫java程序,然后在doc下進行編譯和運行。后來安裝了ecplise這個集成環(huán)境,但是只把它當成一個運行java的集成環(huán)境。
后來經過開發(fā)工具的學習和相關書籍的查看,開始深入的理解了什么是ecplise。其實整個ecplise體系結構就像一個大的拼圖,可以不斷地向其中添加插件,同時在現(xiàn)有的插件上還可以再增加插件。可以說,在ecplise中一切都是插件。這里有一張圖片很形象的說明了ecplise的體系結構:
在我學習ecplise的工程中,我覺得它跟一般的軟件比起來有很大的優(yōu)勢:在編寫代碼的過程中,如果有編譯錯誤的話系統(tǒng)馬上會提醒,我們很容易就會會發(fā)現(xiàn)。而且它會給你提供一些解決問題的方法,雖然有些解決方法有一些笨,但是這對于一些想我們這樣的初學者來說,無疑是雪中送炭。而且在編寫代碼的過程中,我們使用一些類的對象的方法的過程中系統(tǒng)給予一定的提示。這大大的減少了我們出錯的機會,并且我們也可以順便了解一下該類的其他方法。加快我們的學習進度。
武漢理工大學《軟件開發(fā)工具》論文報告
對于ecplise的具體的功能的學習感悟:對于調試器板塊該環(huán)境提供了很多的功能包括單步執(zhí)行、設置斷點和值、檢查變量和值以及暫掛和恢復線程的能力。在我們課堂上只學習了本地調試中的斷點。斷點提供了一種強大的工具,使我們能夠在需要的時間和位置掛起執(zhí)行。與逐句或逐條指令的檢查代碼不同的是,可以讓程序一直執(zhí)行,直到遇到斷點。然后開始調試。這大大的加快了調試過程。沒有這個功能,調試大型程序幾乎不能完成。至于遠程的調試對于現(xiàn)在學習的程度來說有一點難。所以先放棄,以后再研究。
對于JUnit,包括模塊接口測試、局部數據結構測試、路經測試、錯誤處理測試、邊界測試。它的核心類主要有jnuit.framework包下的TestCase、Testsuite和TestResult,junit.runnier包下的BaseTestRunner類。而我們現(xiàn)在用到的只有斷言Assert。在這里有一點原則是需要注意的它的測試名要很容易與應用類區(qū)分開來。
我覺得學會用ecplise來創(chuàng)建的基于SWT的圖形應用程序十分的重要。這個要源于它的開發(fā)緣由。在這之前,使用的awt是原生窗口部件,但是它一直未能突破LCD。為了解決這個問題,又開發(fā)了swing。它使用的是仿真窗口部件,不存在LCD問題。但是消耗太多的內存等。為了徹底解決
上述問題,IBM開發(fā)了SWT。在基于Windows的ecplise中,SWT通過DLL形式的本地庫與操作系統(tǒng)交互;在UNIX下,SWT可通過的GTK運行。
最近的學習和看書,讓我覺得自己的真的就像在軟件的最頂層。自己現(xiàn)在學習的東西在軟件
中真的是基礎中的基礎。我們還有很長的路要走。真的要加油,好好學習。
5.參考文獻
[1]java核心技術卷1:基礎知識葉乃文鄺勁筠杜永萍201*.5機械工業(yè)出版社[2]eclipse3.0程序開發(fā)技術詳解吳越勝李新磊201*.10清華大學出版社
友情提示:本文中關于《項目開發(fā)總結報告模板》給出的范例僅供您參考拓展思維使用,項目開發(fā)總結報告模板:該篇文章建議您自主創(chuàng)作。
來源:網絡整理 免責聲明:本文僅限學習分享,如產生版權問題,請聯(lián)系我們及時刪除。