第一篇:計算機圖書管理系統(tǒng)畢業(yè)論文(VB開發(fā),適用于院系)
致謝
在本次畢業(yè)設(shè)計中,我從指導老師身上學到了很多東西。她認真負責的工作態(tài)度,嚴謹?shù)闹螌W精神和深厚的理論水平都使我收益匪淺。她無論在理論上還是在實踐中,都給與我很大的幫助,使我得到很大的提高,這對于我以后的工作和學習都有一種巨大的幫助,在此感謝她耐心的輔導。在撰寫論文階段,指導老師幾次審閱我的論文,提出了許多寶貴意見,沒有她的指導,我們就不能較好的完成課題設(shè)計的任務(wù)。
另外,我還要感謝在這幾年來對我有所教導的老師,他們孜孜不倦的教誨不但讓我學到了很多知識,而且讓我掌握了學習的方法,更教會了我做人處事的道理,在此表示感謝。同時,在系統(tǒng)開發(fā)過程中還有同組的同學也給了我不少幫助,這里一并表示感謝。
第二篇:VB圖書管理系統(tǒng)
圖書管理系統(tǒng)的設(shè)計與實現(xiàn)
目錄
一、序言······················································································································4
二、需求分析說明書 ····································································································4 2.1系統(tǒng)介紹..................................................................................................................................................4 2.2系統(tǒng)面向的用戶群體..............................................................................................................................4 2.3系統(tǒng)的功能性需求..................................................................................................................................4 2.4系統(tǒng)的非功能性需求..............................................................................................................................5 2.4.1用戶界面需求...................................................................................................................................5 2.4.2軟硬件環(huán)境需求...............................................................................................................................5 2.4.3軟件質(zhì)量需求...................................................................................................................................5
三、可行性分析報告 ····································································································5 3.1技術(shù)可行性..............................................................................................................................................5 3.2人員可能性..............................................................................................................................................5 3.3時間、設(shè)備可能性..................................................................................................................................5 3.4系統(tǒng)工作量..............................................................................................................................................5 3.5代碼工作量..............................................................................................................................................5 3.6文檔要求..................................................................................................................................................5
四、開發(fā)環(huán)境與項目規(guī)劃 ·····························································································5 4.1開發(fā)環(huán)境..................................................................................................................................................5 4.2項目規(guī)劃與管理......................................................................................................................................5 4.2.1開發(fā)人員安排...................................................................................................................................5 4.2.2開發(fā)進度安排...................................................................................................................................6
五、軟件界面設(shè)計標準與規(guī)范 ······················································································6 5.1編寫目的..................................................................................................................................................6 5.2界面設(shè)計思想..........................................................................................................................................6 5.3界面設(shè)計原則..........................................................................................................................................6 5.4界面設(shè)計樣式..........................................................................................................................................6 5.5常見提示信息樣式..................................................................................................................................6 5.6常見錯誤信息樣式..................................................................................................................................7 5.7其他界面約定..........................................................................................................................................7
六、軟件編碼設(shè)計標準與規(guī)范 ······················································································7 6.1對象命名約定..........................................................................................................................................7 6.2常量和變量命名約定..............................................................................................................................8 6.3結(jié)構(gòu)化編碼約定......................................................................................................................................8 6.4數(shù)據(jù)源的約定..........................................................................................................................................9 6.5數(shù)據(jù)庫訪問約定......................................................................................................................................9 6.6其他約定..................................................................................................................................................9
七、數(shù)據(jù)庫分析與設(shè)計·································································································10 7.1數(shù)據(jù)庫環(huán)境說明.......................................................................................................................................10 7.2數(shù)據(jù)庫命名標準與規(guī)范...........................................................................................................................10 7.3數(shù)據(jù)庫邏輯設(shè)計.......................................................................................................................................10 7.4數(shù)據(jù)庫物理設(shè)計.......................................................................................................................................10 7.4.1表、視圖匯總...................................................................................................................................10 7.4.2各表、視圖設(shè)計詳解.......................................................................................................................11
八、軟件體系結(jié)構(gòu)設(shè)計說明書 ······················································································15 8.1系統(tǒng)概述..................................................................................................................................................15 8.2設(shè)計約束..................................................................................................................................................15 8.3設(shè)計策略..................................................................................................................................................15 8.4系統(tǒng)概要設(shè)計說明書..............................................................................................................................16 8.4.1圖例說明...........................................................................................................................................16 8.4.2系統(tǒng)總體結(jié)構(gòu)圖...............................................................................................................................16 8.5系統(tǒng)詳細設(shè)計說明書..............................................................................................................................17 8.5.1系統(tǒng)模塊匯總...................................................................................................................................17 8.5.2系統(tǒng)核心模塊詳解...........................................................................................................................18 8.5.3系統(tǒng)模塊詳解...................................................................................................................................28
九、用戶界面設(shè)計報告·································································································42 9.1界面設(shè)計規(guī)范..........................................................................................................................................42 9.2系統(tǒng)窗體匯總..........................................................................................................................................42 9.3主界面設(shè)計..............................................................................................................................................43 9.4子界面設(shè)計..............................................................................................................................................43 9.5界面資源設(shè)計..........................................................................................................................................44
十、軟件測試分析報告·································································································44 10.1測試范圍與主要內(nèi)容............................................................................................................................44 10.2測試方法................................................................................................................................................44 10.3測試報告................................................................................................................................................44 10.4改進建議與措施....................................................................................................................................45
十一、軟件使用說明書·································································································45 11.1軟件概述.................................................................................................................................................45 11.2使用說明.................................................................................................................................................45 11.2.1系統(tǒng)登陸..........................................................................................................................................45 11.2.2系統(tǒng)退出..........................................................................................................................................46 11.2.3圖書類別管理..................................................................................................................................46 11.2.4圖書信息管理..................................................................................................................................48 11.2.5查詢圖書信息..................................................................................................................................48 11.2.6讀者類別管理..................................................................................................................................49 11.2.7讀者信息管理..................................................................................................................................49 11.2.8查詢讀者信息..................................................................................................................................50 11.2.9借書管理..........................................................................................................................................50 11.2.10還書管理........................................................................................................................................50 參考資料······················································································································51
一、序言
圖書管理系統(tǒng)的設(shè)計與推出是多方面原因促成的,比如學校的圖書管理,日常管理工作 1 都是人工操作,歷史數(shù)據(jù)很難保存和利用。而其他的小型圖書館大多如此。針對這種狀況,我計劃開發(fā)一個面向小型圖書館的圖書管理系統(tǒng),實現(xiàn)對人員、物流的全面管理,以幫助這些圖書館早日實現(xiàn)書店管理信息化。
為了系統(tǒng)的順利開發(fā)和維護,特編制如下技術(shù)文檔:
想要全部 請加QQ:76536415 專業(yè)設(shè)計 畢業(yè)論文
第三篇:vb圖書管理系統(tǒng)源代碼
Borbook:
Public sqltxt As String Public rno As String
'保存讀者借書證號 Public bno As String
'保存讀者圖書編號 Public xm As String
'保存讀者姓名 Public dw As String
'保存讀者單位 Public rs As ADODB.Recordset
Private Sub Comm1_Click()
rno = Trim(Text1(0).Text)
If rno = “" Then
MsgBox ”借書證號不能為空,請輸入“, vbOKOnly, ”信息提示“
Comm2.Enabled = False
Else
sqltxt = ”select * from reader where 借書證號='“ + rno + ”'“
Set rs = exesql(sqltxt)
If rs.RecordCount = 0 Then
MsgBox ”該讀者未登記,不能借書“, vbOKOnly, ”信息提示“
Comm2.Enabled = False
Else
Text2(0).Text = rs.Fields(”姓名“)
Text2(1).Text = str(rs.Fields(”借書總數(shù)“))
Text2(2).Text = str(rs.Fields(”借書總數(shù)“)rs.Fields(”已借書數(shù)“))
End If
End If
End If End Sub
Private Sub retCom_Click()
Unload Me End Sub
Private Sub Form_Load()
Comm2.Enabled = False End Sub
Edbook:
Private Sub DataGrid1_Click()
End Sub
Private Sub Form_Load()
'說明:為什么使用recs,而不直接使用adodc1.recordset.recordcount?在調(diào)用edbook1窗體添加一個記錄(確定)后,再
'返回到本表單,若不在Form_Activate()事件過程中調(diào)用adodc1.refresh進行刷新,adodc1.recordset.recordcount值
'仍未增1,這樣調(diào)用encomm過程時出錯;若在Form_Activate()事件過程中調(diào)用adodc1.refresh進行刷新,'adodc1.recordset.recordcount值增1了,調(diào)用encomm過程時也正確,但返回本窗體時,當前行總是第一行,顯然也不行,'因為用戶在添加或修改后希望在datagrid1中顯示當前操作的那條記錄.recs = Adodc1.Recordset.RecordCount End Sub
Private Sub Form_Activate()
DataGrid1.SetFocus
Call encomm End Sub
Private Sub Comm1_Click()
flag = 1
edbook1.Show vbModal End Sub
Private Sub Comm2_Click()
flag = 2
edbook1.Show vbModal End Sub
Private Sub Comm3_Click()
If MsgBox(”真的要刪除[“ + Trim(Adodc1.Recordset.Fields(”書名“))+ ”]嗎?“, vbYesNo, ”信息提示“)= vbYes Then
Adodc1.Recordset.Delete
recs = recs1
Call encomm
End If End Sub
Private Sub Comm4_Click()
Unload Me End Sub
Private Sub encomm()
If recs = 0 Then
Comm2.Enabled = False
Comm3.Enabled = False
Else
Comm2.Enabled = True
Comm3.Enabled = True
End If End Sub
Edlev1:
Dim cond As String
Private Sub Form_Load()
If flag = 2 Then
Text1(0).Text = edlev.Adodc1.Recordset.Fields(”級別“)
Text1(1).Text = edlev.Adodc1.Recordset.Fields(”過期罰款“)
Text1(2).Text = edlev.Adodc1.Recordset.Fields(”借書總數(shù)“)
Text1(3).Text = edlev.Adodc1.Recordset.Fields(”借書天數(shù)“)
End If End Sub
Private Sub Comm1_Click()
If Trim(Text1(0).Text)= ”“ Or Trim(Text1(1).Text)= ”“ Or Trim(Text1(2).Text)= ”“ Or _
Trim(Text1(3).Text)= ”“ Then
MsgBox ”數(shù)據(jù)項不全,請重新設(shè)置“, vbOKOnly, ”信息提示“
Text1(0).SetFocus
Exit Sub
End If
If flag = 1 Then '添加操作
If edlev.Adodc1.Recordset.RecordCount > 0 Then '原記錄個數(shù)大于0
cond = ”級別='“ + Trim(Text1(0).Text)+ ”'“
edlev.Adodc1.Recordset.MoveFirst
'每次從頭開始查找
edlev.Adodc1.Recordset.Find(cond)
If Not edlev.Adodc1.Recordset.EOF()Then
MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“
Text1(0).SetFocus
Exit Sub
End If
End If
edlev.Adodc1.Recordset.AddNew
edlev.Adodc1.Recordset.Fields(”級別“)= Trim(Text1(0).Text)
edlev.Adodc1.Recordset.Fields(”過期罰款“)= Val(Trim(Text1(1).Text))
edlev.Adodc1.Recordset.Fields(”借書總數(shù)“)= Val(Trim(Text1(2).Text))
edlev.Adodc1.Recordset.Fields(”借書天數(shù)“)= Val(Trim(Text1(3).Text))
edlev.Adodc1.Recordset.Update
recs = recs + 1
Else
'修改操作
n = edlev.Adodc1.Recordset.AbsolutePosition
cond = ”級別='“ + Trim(Text1(0).Text)+ ”'“
edlev.Adodc1.Recordset.MoveFirst '每次從頭開始查找
edlev.Adodc1.Recordset.Find(cond)
If Not edlev.Adodc1.Recordset.EOF()And edlev.Adodc1.Recordset.AbsolutePosition <> n Then
MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“
edlev.Adodc1.Recordset.MoveFirst
'這兩個語句恢復原記錄位置
edlev.Adodc1.Recordset.Move(n1)
edlev.Adodc1.Recordset.Fields(”級別“)= Trim(Text1(0).Text)
edlev.Adodc1.Recordset.Fields(”過期罰款“)= Val(Trim(Text1(1).Text))
edlev.Adodc1.Recordset.Fields(”借書總數(shù)“)= Val(Trim(Text1(2).Text))
edlev.Adodc1.Recordset.Fields(”借書天數(shù)“)= Val(Trim(Text1(3).Text))
edlev.Adodc1.Recordset.Update
End If
Unload Me End Sub
Private Sub Comm2_Click()
Unload Me End Sub
Edreader:
Private Sub DataGrid1_Click()
End Sub
Private Sub Form_Load()
recs = Adodc1.Recordset.RecordCount End Sub
Private Sub Form_Activate()
DataGrid1.SetFocus
Call encomm End Sub
Private Sub Comm1_Click()
flag = 1
edreader1.Show vbModal End Sub
Private Sub Comm2_Click()
flag = 2
edreader1.Show vbModal End Sub
Private Sub Comm3_Click()
If MsgBox(”真的要刪除[“ + Trim(Adodc1.Recordset.Fields(”姓名“))+ ”]嗎?“, vbYesNo, ”信息提示“)= vbYes Then
Adodc1.Recordset.Delete
recs = recs1
Call encomm
End If End Sub Private Sub Comm4_Click()
Adodc1.Recordset.UpdateBatch
Adodc1.Recordset.Close
Unload Me End Sub Private Sub encomm()
If recs = 0 Then
Comm2.Enabled = False
Comm3.Enabled = False
Else
Comm2.Enabled = True
Comm3.Enabled = True
End If End Sub
Edrec1:
Dim cond As String
Private Sub Form_Load()
Label1.Caption = cap
If flag = 1 Then
Text1.Text = ”“
Else
Text1.Text = edrec.Adodc1.Recordset.Fields(”fn“)
End If End Sub
Private Sub Comm1_Click()
If Trim(Text1.Text)= ”“ Then
MsgBox ”數(shù)據(jù)項不能為空,請重新設(shè)置“, vbOKOnly, ”信息提示“
Text1.SetFocus
Exit Sub
End If
If flag = 1 Then '添加操作
If edrec.Adodc1.Recordset.RecordCount > 0 Then '原記錄個數(shù)大于0
cond = ”fn='“ + Trim(Text1.Text)+ ”'“
edrec.Adodc1.Recordset.MoveFirst
'每次從頭開始查找
edrec.Adodc1.Recordset.Find(cond)
If Not edrec.Adodc1.Recordset.EOF()Then
MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“
Text1.SetFocus
Exit Sub
End If
End If
edrec.Adodc1.Recordset.AddNew
edrec.Adodc1.Recordset.Fields(”fn“)= Trim(Text1.Text)
edrec.Adodc1.Recordset.Update
recs = recs + 1
Else
'修改操作
n = edrec.Adodc1.Recordset.AbsolutePosition
cond = ”fn='“ + Trim(Text1.Text)+ ”'“
edrec.Adodc1.Recordset.MoveFirst '每次從頭開始查找
edrec.Adodc1.Recordset.Find(cond)
If Not edrec.Adodc1.Recordset.EOF()And edrec.Adodc1.Recordset.AbsolutePosition <> n Then
MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“
edrec.Adodc1.Recordset.MoveFirst
'這兩個語句恢復原記錄位置
edrec.Adodc1.Recordset.Move(n1)
edrec.Adodc1.Recordset.Fields(”fn“)= Trim(Text1.Text)
edrec.Adodc1.Recordset.Update
End If
Unload Me End Sub
Private Sub Comm2_Click()
Unload Me End Sub
Menu:
Private Sub MDIForm_Load()
If Not userlevel = ”系統(tǒng)管理員“ Then
menu21.Enabled = False
menu31.Enabled = False
menu41.Enabled = False
menu42.Enabled = False
End If End Sub
Private Sub menu11_Click()
borbook.Show vbModal End Sub
Private Sub menu12_Click()
retbook.Show vbModal End Sub
Private Sub menu13_Click()
End End Sub
Private Sub menu21_Click()
edbook.Show vbModal End Sub
Private Sub menu22_Click()
qubook.Show vbModal End Sub
Private Sub menu31_Click()
edreader.Show vbModal End Sub
Private Sub menu32_Click()
qureader.Show vbModal End Sub
Private Sub menu41_Click()
setuser.Show vbModal End Sub
Private Sub menu42_Click()
If MsgBox(”本功能要清除系統(tǒng)中所有數(shù)據(jù),真的初始化嗎?“, vbYesNo, ”確認初始化操作“)
= vbYes Then
Call deldata(”book“)Call deldata(”reader“)Call deldata(”borrow“)Call deldata(”rlevel“)
Call deldata(”depart“)
Call deldata(”press“)
Call deldata(”oper“)
MsgBox ”系統(tǒng)初始化完畢,下次只能以1234/1234(用戶名/口令)進入本系統(tǒng)“, vbOKOnly, ”信息提示“
End If End Sub
Pass:
Public n As Integer
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = ”select * from oper where 用戶名='“ & _
Trim$(Text1(0).Text)& ”'“ & ” And 口令 = '“ & Trim$(Text1(1).Text)+ ”'“
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then '未找到用戶記錄
n = n + 1
If n < 3 Then
MsgBox ”沒有這個用戶,繼續(xù)登錄“, vbOKOnly + vbExclamation, ”信息提示“
Text1(0).Text = ”“
Text1(1).Text = ”“
Text1(0).SetFocus
Else
MsgBox ”已登錄失敗三次,退出系統(tǒng)“, vbOKOnly + vbExclamation, ”信息提示“
mrc.Close
Unload Me
End If
Else
'找到合法用戶記錄
userlevel = Trim(mrc.Fields(”級別“))
mrc.Close
Unload Me
menu.Show '調(diào)用menu窗體
End If End Sub
Private Sub Command2_Click()
Unload Me End Sub
Private Sub Form_Load()
n = 0
'n保存登錄的次數(shù) End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
Call endata(KeyAscii)End Sub
Qubook:
Private Sub Comm1_Click()
Dim sqltxt As String
If Adodc1.Recordset.Fields(”借否“)= ”借“ Then
no = Trim(Adodc1.Recordset.Fields(”圖書編號“))
sqltxt = ”select * from borrow where 圖書編號='“ + no + ”'“
Set rs = exesql(sqltxt)
If rs.RecordCount = 0 Then
MsgBox ”該圖書沒有借書記錄“, vbOKOnly, ”信息提示“
Else
MsgBox ”圖書編號:“ + no + Chr(10)+ Chr(13)+ _
”書
名:“ + Trim(rs.Fields(”書名“))+ Chr(10)+ Chr(13)+ _
”借 書 人:“ + Trim(rs.Fields(”姓名“))+ Chr(10)+ Chr(13)+ _
”單
位:“ + Trim(rs.Fields(”單位“))+ Chr(10)+ Chr(13)+ _
”借書日期:“ + Format(rs.Fields(”借書日期“), ”yyyy.mm.dd“), vbOKOnly, ”查找結(jié)果“
End If
rs.Close
Else
MsgBox ”該書沒有外借,不能顯示借書人“, vbOKOnly, ”信息提示“
End If End Sub
Private Sub Comm2_Click()
Unload Me End Sub
Private Sub Form_Activate()
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
Call encomm End Sub
Private Sub selcmd1_Click()'設(shè)置條件確定
Dim str As String
str = ”“
'條件表達式
If Trim(Text1(0).Text)<> ”“ Then
If str = ”“ Then
str = ”圖書編號='“ + Trim(Text1(0).Text)+ ”'“
Else
str = str + ” and 圖書編號='“ + Trim(Text1(0).Text)+ ”'“
End If
End If
If Trim(Text1(1).Text)<> ”“ Then
If str = ”“ Then
str = ”書名='“ + Trim(Text1(1).Text)+ ”'“
Else
str = str + ” and 書名='“ + Trim(Text1(1).Text)+ ”'“
End If
End If
If Trim(Text1(2).Text)<> ”“ Then
If str = ”“ Then
str = ”作者='“ + Trim(Text1(2).Text)+ ”'“
Else
str = str + ” and 作者='“ + Trim(Text1(2).Text)+ ”'“
End If
End If
If Trim(Text1(3).Text)<> ”“ Then
If str = ”“ Then
str = ”出版社='“ + Trim(Text1(3).Text)+ ”'“
Else
str = str + ” and 出版社='“ + Trim(Text1(3).Text)+ ”'“
End If
End If
If Trim(Text1(4).Text)<> ”“ Then
If str = ”“ Then
str = ”借否='“ + Trim(Text1(4).Text)+ ”'“
Else
str = str + ” and 借否='“ + Trim(Text1(4).Text)+ ”'“
End If
End If
If Trim(Text1(5).Text)<> ”“ Then
If str = ”“ Then
str = ”定價=“ + Trim(Text1(5).Text)
Else
str = str + ” and 定價=“ + Trim(Text1(5).Text)
End If
End If
If str <> ”“ Then
Adodc1.RecordSource = ”select * from book where “ + str
Adodc1.Refresh
Else
Adodc1.RecordSource = ”select * from book“
Adodc1.Refresh
End If
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox ”沒有任何滿足條件的記錄“, vbOKOnly, ”信息提示“
End If
Call encomm End Sub
Private Sub selcmd2_Click()'設(shè)置條件重置
Text1(0).Text = ”“
Text1(1).Text = ”“
Text1(2).Text = ”“
Text1(3).Text = ”“
Text1(4).Text = ”“
Text1(5).Text = ”“ End Sub
Private Sub encomm()'自定義子過程:判斷Adodc1中是否存在記錄
If Adodc1.Recordset.RecordCount = 0 Then
Comm1.Enabled = False
Else
Comm1.Enabled = True
End If End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
Call endata(KeyAscii)End Sub
Qureader:
Private Sub Comm1_Click()
Dim strn As String
Dim sqltxt As String
no = Trim(Adodc1.Recordset.Fields(”借書證號“))
sqltxt = ”select * from borrow where 借書證號='“ + no + ”'“
Set rs = exesql(sqltxt)
If rs.RecordCount = 0 Then
MsgBox ”該讀者沒有借任何圖書“, vbOKOnly, ”信息提示“
Else
rs.MoveFirst
strn = ”書
名(借書日期)“ + Chr(10)+ Chr(13)
Do While Not rs.EOF()
strn = strn & Trim(rs.Fields(”書名“))& ”(“ & Format(rs.Fields(”借書日期“), ”yyyy.mm.dd“)& ”)“ + Chr(10)+ Chr(13)
rs.MoveNext
Loop
MsgBox strn, vbOKOnly, ”列所借圖書清單“
rs.Close
End If End Sub
Private Sub Comm2_Click()
Unload Me End Sub
Private Sub Form_Activate()
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
Call encomm End Sub
Private Sub selcmd1_Click()'設(shè)置條件確定
Dim str As String
str = ”“
'條件表達式
If Trim(Text1(0).Text)<> ”“ Then
If str = ”“ Then
str = ”借書證號='“ + Trim(Text1(0).Text)+ ”'“
Else
str = str + ” and 借書證號='“ + Trim(Text1(0).Text)+ ”'“
End If
End If
If Trim(Text1(1).Text)<> ”“ Then
If str = ”“ Then
str = ”姓名='“ + Trim(Text1(1).Text)+ ”'“
Else
str = str + ” and 姓名='“ + Trim(Text1(1).Text)+ ”'“
End If
End If
If Trim(Text1(2).Text)<> ”“ Then
If str = ”“ Then
str = ”單位='“ + Trim(Text1(2).Text)+ ”'“
Else
str = str + ” and 單位='“ + Trim(Text1(2).Text)+ ”'“
End If
End If
If Trim(Text1(3).Text)<> ”“ Then
If str = ”“ Then
str = ”級別='“ + Trim(Text1(3).Text)+ ”'“
Else
str = str + ” and 級別='“ + Trim(Text1(3).Text)+ ”'“
End If
End If
If Trim(Text1(4).Text)<> ”“ Then
If str = ”“ Then
str = ”性別='“ + Trim(Text1(4).Text)+ ”'“
Else
str = str + ” and 性別='“ + Trim(Text1(4).Text)+ ”'“
End If
End If
If str <> ”“ Then
Adodc1.RecordSource = ”select * from reader where “ + str
Adodc1.Refresh
Else
Adodc1.RecordSource = ”select * from reader“
Adodc1.Refresh
End If
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox ”沒有任何滿足條件的記錄“, vbOKOnly, ”信息提示“
End If
Call encomm End Sub
Private Sub selcmd2_Click()'設(shè)置條件重置
Text1(0).Text = ”“
Text1(1).Text = ”“
Text1(2).Text = ”“
Text1(3).Text = ”“
Text1(4).Text = ”“ End Sub
Private Sub encomm()'自定義子過程:判斷Adodc1中是否存在記錄
If Adodc1.Recordset.RecordCount = 0 Then
Comm1.Enabled = False
Else
Comm1.Enabled = True
End If End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
Call endata(KeyAscii)End Sub
Retbook:
Public rno As String Public bno As String
Private Sub Comm1_Click()
bno = Trim(Text1.Text)
If bno <> ”“ Then
Dim sqltxt As String
sqltxt = ”select * from borrow where 圖書編號='“ + bno + ”'“
Set brs = exesql(sqltxt)
If brs.RecordCount = 0 Then
MsgBox ”該書不是從本圖書館所借的,不能歸還!“, vbOKOnly, ”信息提示“
Else
If Trim(brs.Fields(”借書證號“))<> rno Then
If rno <> ”“ Then
'另一讀者還書,自動列出上一個還書人的罰款單
dstr = ”罰款單“ + Chr(10)+ Chr(13)
dstr = dstr & ”姓名:“ & Trim(Text2(1).Text)+ ”(“ + rno + ”)罰款總額:“ & str(Text2(4).Text)& ”元“
MsgBox dstr, vbOKOnly, ”列罰款單“
End If
rno = Trim(brs.Fields(”借書證號“))
sqltxt = ”select * from book where 圖書編號='“ + bno + ”'“ '處理圖書記錄
Set bs = exesql(sqltxt)
bs.Fields(”借否“)= ”否“
bs.Update
sqltxt = ”select * from reader where 借書證號='“ + rno + ”'“ '處理讀者記錄
Set rs = exesql(sqltxt)
rs.Fields(”已借書數(shù)“)= rs.Fields(”已借書數(shù)“)rs.Fields(”已借書數(shù)“)
If(Datebrs.Fields(”借書日期“)1
rs.Update
If(Datebrs.Fields(”借書日期“)1
Call encomm
End If End Sub
Private Sub Comm4_Click()
Unload Me End Sub
Private Sub encomm()
If recs = 0 Then
Comm2.Enabled = False
Comm3.Enabled = False
Else
Comm2.Enabled = True
Comm3.Enabled = True
End If End Sub
Setuser1:
Dim cond As String
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys ”{TAB}“
End If End Sub
Private Sub Form_Load()
If flag = 2 Then
Text1(0).Text = setuser.Adodc1.Recordset.Fields(”用戶名“)
Text1(1).Text = setuser.Adodc1.Recordset.Fields(”口令“)
Combo1.Text = setuser.Adodc1.Recordset.Fields(”級別“)
End If End Sub
Private Sub Comm1_Click()
If Trim(Text1(0).Text)= ”“ Or Trim(Text1(1).Text)= ”“ Or Trim(Combo1.Text)= ”“ Then
MsgBox ”數(shù)據(jù)項不全,請重新設(shè)置“, vbOKOnly, ”信息提示“
Text1(0).SetFocus
Exit Sub
End If
If flag = 1 Then '添加操作
If setuser.Adodc1.Recordset.RecordCount > 0 Then '原記錄個數(shù)大于0
cond = ”級別='“ + Trim(Text1(0).Text)+ ”'“
setuser.Adodc1.Recordset.MoveFirst
'每次從頭開始查找
setuser.Adodc1.Recordset.Find(cond)
If Not setuser.Adodc1.Recordset.EOF()Then
MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“
Text1(0).SetFocus
Exit Sub
End If
End If
setuser.Adodc1.Recordset.AddNew
setuser.Adodc1.Recordset.Fields(”用戶名“)= Trim(Text1(0).Text)
setuser.Adodc1.Recordset.Fields(”口令“)= Val(Trim(Text1(1).Text))
setuser.Adodc1.Recordset.Fields(”級別“)= Trim(Combo1.Text)
setuser.Adodc1.Recordset.Update
recs = recs + 1
Else
'修改操作
n = setuser.Adodc1.Recordset.AbsolutePosition
cond = ”級別='“ + Trim(Text1(0).Text)+ ”'“
setuser.Adodc1.Recordset.MoveFirst '每次從頭開始查找
setuser.Adodc1.Recordset.Find(cond)
If Not setuser.Adodc1.Recordset.EOF()And setuser.Adodc1.Recordset.AbsolutePosition <> n Then
MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“
setuser.Adodc1.Recordset.MoveFirst
'這兩個語句恢復原記錄位置
setuser.Adodc1.Recordset.Move(n1)
setuser.Adodc1.Recordset.Fields(”用戶名“)= Trim(Text1(0).Text)
setuser.Adodc1.Recordset.Fields(”口令“)= Val(Trim(Text1(1).Text))
setuser.Adodc1.Recordset.Fields(”級別“)= Trim(Combo1.Text)
setuser.Adodc1.Recordset.Update
End If
Unload Me End Sub
Private Sub Comm2_Click()
Unload Me End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
Call endata(KeyAscii)End Sub
模塊:
Public userlevel As String '保存用戶級別
Public flag As Integer
'用作記錄操作標記
Public tna As String
'保存表名:用于調(diào)用edrec1窗體 Public cap As String
'保存標題名:用于調(diào)用edrec1窗體 Public recs As Integer
'保存記錄集中記錄個數(shù)
Sub main()
pass.Show vbModal End Sub
Public Function exesql(ByVal sql As String)As ADODB.Recordset
sql = Trim$(sql)
Set conn = New ADODB.Connection
Set rst = New ADODB.Recordset
conn.ConnectionString = ”DSN=Library;UID=sa;PWD=;“
conn.Open
Set rst.ActiveConnection = conn
rst.LockType = adLockOptimistic
rst.CursorType = adOpenKeyset
rst.Open sql
Set exesql = rst
Set rst = Nothing
Set conn = Nothing End Function
Public Sub deldata(ByVal tn As String)刪除指定表中所有記錄,對于oper表添加一個系統(tǒng)用戶
Dim sql As String
sql = ”delete “ & Trim$(tn)
Set conn = New ADODB.Connection
conn.ConnectionString = ”DSN=Library;UID=sa;PWD=;“
conn.Open
conn.Execute sql
If Trim(tn)= ”oper“ Then
sql = ”insert oper values('1234','1234','系統(tǒng)管理員')“
conn.Execute sql
End If
conn.Close End Sub Public Sub endata(Keyasc As Integer)
If Keyasc = 13 Then
SendKeys ”{TAB}" '將回車鍵轉(zhuǎn)換成Tab鍵
End If End Sub
第四篇:VB 圖書管理系統(tǒng) 畢業(yè)設(shè)計 外文翻譯
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 1 頁
現(xiàn)在送(畢業(yè)設(shè)計論文、文獻綜述、外文翻譯、開題報告、答辯PPT)
都可以直接下載
源程序因為無法上傳百度,需要者去空間留言
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 2 頁
譯文:
Visual Basic 語言與算法
1991年,美國微軟公司推出了Visual Basic(可簡稱VB),目前的最新版本是VB 2008 Beta2(VB9)中文版。
Visual 意即可視的、可見的,指的是開發(fā)像windows操作系統(tǒng)的圖形用戶界面(Graphic User Interface,GUI)的方法,它不需要編寫大量代碼去描述界面元素的外觀和位置,只要把預先建立好的對象拖放到屏幕上相應的位置即可。
Basic 實際上是一個短語的縮寫,這個短語就是 Beginners all_purpose symbolic instruction code,其中文意思為“初始者通用符號指令代碼語言”。Visual Basic有學習版、專業(yè)版和企業(yè)版三種版本,以滿足不同的開發(fā)需要。學習版適用于普通學習者及大多數(shù)使用Visual Basic開發(fā)一般Windows應用程序的人員,但是;專業(yè)版適用于計算機專業(yè)開發(fā)人員,包括了學習版的全部內(nèi)容功能以及Internet控件開發(fā)工具之類的高級特性;企業(yè)版除包含專業(yè)版全部的內(nèi)容外,還有自動化構(gòu)件管理器等工具,使得專業(yè)編程人員能夠開發(fā)功能強大的組骨子里分布式應用程序。
Visual Basic
第1節(jié)Visual Basic的概述
Microsoft Visual Basic(簡稱VB)是在Windows操作平臺下設(shè)計應用程序的最速度、最簡捷的工具之一。不論是初學者還是專業(yè)開發(fā)人員,VB都為他們提供了一整套的工具,可以輕松方便的開發(fā)應用程序。因此,VB一直被作為大多數(shù)電腦初學者的首選入門編程語言。
“Visual”指的是采用可視化的開發(fā)圖形用戶界面(GUI)的方法,一般不需要編寫大量代碼去描述界面元素的外觀和位置,而只要把需要的控件拖放到屏幕上的相應位置即可方便圖形設(shè)計圖形用戶界面;“Basic”指的是 BASIC語言,因為VB是在原有的BAISC語言的基礎(chǔ)上發(fā)展起來的。
VB是 Microsoft的一種通用程序設(shè)計語言,它包括在 Microsoft Excel、Microsoft Access等眾多Windows應用軟件中的VBA都使用VB語言,以供用戶進行二次開發(fā);目前制作網(wǎng)頁使用較多的VBScript腳本語言也是VB的子集。
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 3 頁
利用VB的數(shù)據(jù)訪問特性用戶可以對包括 Microsoft SQL Server和其他企業(yè)數(shù)據(jù)庫在內(nèi)的大部分數(shù)據(jù)庫格式創(chuàng)建數(shù)據(jù)庫和前端應用程序,以及可調(diào)整的服務(wù)端部件。利用ActiveX(TM)技術(shù),VB可使用 Microsoft Word字處理器、Microsoft Excel電子數(shù)據(jù)表極其他Windows應用程序提供的功能,甚至可直接使用由VB專業(yè)版或企業(yè)版創(chuàng)建的應用程序和對象。
用戶最終創(chuàng)建的程序是一個真正的.EXE文件,可以自由發(fā)布。
VB提供了學習版,專業(yè)版和企業(yè)版,用以滿足不同的開發(fā)需求。學習版使編程人員很容易地開發(fā)Windows和Windows NT的應用程序。專業(yè)版為專業(yè)編程人員提供了功能完備的開發(fā)工具,專業(yè)版中包含了學習版的所有功能。企業(yè)版允許專業(yè)人員以小組的形式來創(chuàng)建強大的分布式應用程序。它包括專業(yè)版的所有的特性。所以可以根據(jù)不同的需要來選擇不同的版本。
第2節(jié)集成開發(fā)環(huán)境
VB的集成環(huán)境或稱IDE,由多個部分組成,包含了標題欄、菜單欄、工具欄、控件箱,以及窗體設(shè)計器窗口、工程管理器窗口、屬性窗口、代碼窗口和窗體布局窗體布局等。覆蓋了開發(fā)應用程序的設(shè)計、編輯、編譯和調(diào)試等所有功能。
在VB中,應用程序也稱工程。當?shù)谝淮螁覸B并打開一個新工程時,可以看到如圖所示的集成開發(fā)環(huán)境界面。
Visual Basic 集成開發(fā)環(huán)境
VB通過工程來組織應用程序的開發(fā),使用工程來管理構(gòu)成應用程序的所有文件。一個工程一般由若干個窗體、標準模塊以及應用環(huán)境組成。系統(tǒng)通過工程菜單來對工程進行管理,如添加窗體、引用等。系統(tǒng)允許同時打開和管理多個工程。
第3節(jié)Visual Basic語言簡介
Basic是最常被用來做入門使用的高級語言。它的全名是 Beginner’s All-purpose Sumbolic Instruction Code,簡稱為 BASIC。顧名思義,Basic就是一種專為初學者設(shè)計的語言,因其易學易懂,所以身受歡迎。早期的Basic語言都是屬于解譯式的,因此可以一行一行地執(zhí)行,所以它可以立刻看到執(zhí)行的結(jié)果,對初學者來說這是很方便的設(shè)計。不過它也因此沒有結(jié)構(gòu)化的概念,在程序的維護及管理上比起其他語言困難許多。不過在后期的Basic則改正了以上的缺點(如 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 4 頁
Quick Basic),使得它也可以用來開發(fā)較大型的程序。
語言是構(gòu)成VB程序的基本成分。VB規(guī)定了語句格式和功能。
語法:
語句定義符[語句體]
語句定義符用于規(guī)定語句的功能,語句體指定語句的具體內(nèi)容或要執(zhí)行的具體操作。所有語句的集合就是VB語言,用VB語句進行有機組合完成某個特定功能就是程序。界面+程序就能解決某個應用問題。
VB應用程序代碼一般在“代碼編輯器”窗口編寫?!按a編輯器”像是一個高度專門化的字處理軟件,有很多便于編寫VB代碼的功能,圖所示為[例Ex-Hello]在“代碼編輯器”窗口編寫的代碼。
“代碼編輯器”窗口
第4節(jié)用Visual Basic開發(fā)應用程序
使用VB編程,一般先設(shè)計應用程序的外觀,然后再分別編寫各對象事件的程序代碼或其他處理程序,編程的工作要輕松多。
創(chuàng)建應用程序的步驟如下:
1. 創(chuàng)建應用程序界面
界面是用戶和程序交互的橋梁,用VB創(chuàng)建的標準的WINDOWS應用程序的界面一般由窗體和按鈕、菜單、文本框的圖象框等構(gòu)成。根據(jù)程序的功能要求和用戶與程序之間的信息交流的需要,來確定需要那些對象,規(guī)劃界面的布局。
2. 設(shè)計界面上各個對象的屬性
根據(jù)規(guī)劃的界面要求設(shè)置各個對象的屬性,比如對象的外貌、名稱、顏色、大小等。
大多數(shù)屬性取值既可以在設(shè)計時通過屬性窗口來設(shè)置,也可以在程序代碼中通過編程在程序運行時設(shè)置修改。
3. 編程對象響應的程序代碼
界面僅僅決定了程序的外觀,設(shè)計完界面后就要通過“代碼編輯器” 窗口來添加代碼,實現(xiàn)一些在接受外界信息后作出響應、信息處理等任務(wù),添加代碼,實現(xiàn)一些在接受外界信息后作出的響應、信息處理等任務(wù),添加代碼如圖的代碼編輯窗口所示
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 5 頁
“代碼編輯器”窗口
4. 保存工程
一個VB程序就是一個工程,在設(shè)計一個應用程序時,系統(tǒng)會建立一個擴展名為.vbp的工程文件,工程文件包含了該工程所建立的所有文件的相關(guān)信息,保存工程就同時保存了該工程的所有相關(guān)文件。比如當設(shè)計界面時產(chǎn)生的窗體保存在擴展名為.frm和.frx的窗體文件中。在打開一個工程(文件)時,該工程有關(guān)的所有文件同時被裝載。
5. 行和調(diào)試程序
通過“運行”菜單中的選項來運行程序,當出現(xiàn)錯誤時,VB系統(tǒng)可以提供信息提示也可通過“調(diào)試”和“運行”菜單來查找和排除錯誤。
6.生成可執(zhí)行程序
為了使程序可以脫離VB環(huán)境,通過“文件”菜單中的“生成工程1.exe”命令來生成可執(zhí)行程序(.exe文件),此后即可直接執(zhí)行該文件。在生成可+執(zhí)行程序后,再通過安裝向?qū)⑺邢嚓P(guān)文件打包,就可以作為一個軟件產(chǎn)品在windows 9x/2000 環(huán)境下安裝后獨立運行
VB的數(shù)據(jù)庫編程方面按其難易程度可分為三類(由易到難);●使用數(shù)據(jù)庫控制項和綁定控制項 ●使用數(shù)據(jù)庫對象變量進行編程 ●直接調(diào)用ODBC2.0API 在使用VB進行數(shù)據(jù)庫編程時,通常,會首先選擇三種基本方法之一來進行數(shù)據(jù)庫應用程序的方案設(shè)計, 現(xiàn)在就將以上三種設(shè)計方法的適應范圍及其優(yōu)缺點進行一個比較。使用數(shù)據(jù)庫控制項和綁定控制項 1.1優(yōu)點
它是三種方法中編碼量最小的 不必了解CDBC2.0API的細節(jié)
允許使用標準的和第三方廠商制訂的控制項 簡化了錯誤處理
支持所有的動態(tài)集方法及屬性
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 6 頁
1.2缺點
不能存取快照對象(snapshop)對象或表格對象(都屬于記錄集對象)不能存取數(shù)據(jù)庫集合,比如表定義(TableDefs)字段(Fieds),索引(Indexes)及查詢定義(QueryDefs)只能存取部分ODBC2.0管理函數(shù) 不能進行真正的事務(wù)處理 有限的錯誤診斷功能 1.3應用
對中小規(guī)模的數(shù)據(jù)庫表(通常少于一千條記錄)只進行簡章的瀏覽操作 基本SQL查詢所對應的結(jié)果集長度有限(通常結(jié)果集的記錄數(shù)小于一百, 這些記錄從一個或兩個長度有限的表中檢索出來)應用程序的數(shù)據(jù)輸入/輸出項較少(通常只涉及一個或兩個長度有限的表、并且表中的字段數(shù)在10個左右且不具有關(guān)系完整性限制 使用數(shù)據(jù)庫對象變量進行編程 2.1 優(yōu)點
可以在程序中存取ODBC2.0的管理函數(shù)
可以控制多種記錄集類型:Dynaset、Snapshop及Table記錄集合對象 可以存取存儲過程和查詢動作
可以存取數(shù)據(jù)庫集合對象,例如TableDefs、Fields、Indexes及QueryDefs 具有真正的事務(wù)處理能力 , 包括啟動事務(wù)(Begintrans)、提交事務(wù)(CommitTrans)及回滾事務(wù)(Rollback)2.2 缺點
比使用數(shù)據(jù)控制項的方法編碼量較大 只能進行間接的錯誤處理和錯誤恢復 對每個數(shù)據(jù)庫操作沒有細粒度的控制
對結(jié)果集和包含結(jié)果集的內(nèi)豐資源的操作受到限制 同直接使用ODBC2.0API函數(shù)的方法相比性能較低 2.3 應用
應用程序需要在執(zhí)行期間動態(tài)地建立表、字段及索引.學院畢業(yè)設(shè)計(論文)譯文專用紙 第 7 頁
應用程序涉及同步更新幾張表(但在邏輯上保持一致性)的復雜事務(wù) 應用程序使用結(jié)果集而不是Dynaset的窗體(FORMS),例如Snapshots或Tables,這里是設(shè)計要考慮的關(guān)鍵
應用程序的表非常大,多于1000條記錄
應用程序具有復雜的數(shù)據(jù)輸入/輸出項,它涉及許多內(nèi)部相關(guān)的字段并且包括數(shù)據(jù)庫參照完整性或一致性規(guī)則
應用程序需要執(zhí)行一些額外的操作和對結(jié)果集的查詢后處理, 尤其是需要很高的數(shù)據(jù)格式化顯示
應用程序需要利用復雜的ODBC管理功能以選擇、配置、校驗及建立各種數(shù)據(jù)源
應用程序需要在執(zhí)行期間“顯示”數(shù)據(jù)庫的基本結(jié)構(gòu) 應用程序需要使用復雜的多碼索引方式來檢索或更新記錄 3 直接調(diào)用ODBC2.0API 3.1 優(yōu)點
可以直接參與結(jié)果集的開發(fā)、管理及規(guī)范化
對結(jié)果集游標提供了更多的控制,并且提供了更多的游標類型和執(zhí)行動作 能夠確定ODBC驅(qū)動程序及SQL的一致性級別 可以更好地控制Windows的執(zhí)行調(diào)度及資源利用
其他方面同其他方法差不多,因此這種方法很可能具有最好的性能 3.2 缺點
較其他兩種方法需要大量的代碼
代碼復雜并且要求程序員具有編制API調(diào)用的經(jīng)驗
在網(wǎng)絡(luò)上Visual Basic運行期間庫的錯誤處理缺乏安全性,因此代碼運行期間出現(xiàn)的錯誤所造成的后果會非常嚴重
3.3 應用
如果系統(tǒng)環(huán)境為客戶機/服務(wù)器模式下的大規(guī)模多用戶環(huán)境,那么應用程序必須都能夠準確地解決可能出現(xiàn)的系統(tǒng)錯誤和失敗
應用程序強調(diào)資源使用,這里如何對內(nèi)存、網(wǎng)絡(luò)服務(wù)器資源進行直接控制是首要的考慮因素
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 8 頁
應用程序使用超大規(guī)模數(shù)據(jù)庫,例如數(shù)據(jù)庫表可能包含幾萬或幾十萬條記錄 計算機系統(tǒng)中的任何軟件,都是由大大小小的各種軟件組成部分構(gòu)成,各自按照特定的算法來實現(xiàn),算法的好壞直接決定所實現(xiàn)軟件性能的優(yōu)劣。用什么方法來設(shè)計算法,所設(shè)計算法需要什么樣的資源,需要多少運行時間、多少存儲空間,如何判定一個算法的好壞,在實現(xiàn)一個軟件時,都是必須予以解決的。計算機系統(tǒng)中的操作系統(tǒng)、語言編譯系統(tǒng)、數(shù)據(jù)庫管理系統(tǒng)以及各種各樣的計算機應用系統(tǒng)中的軟件,都必須用一個個具體的算法來實現(xiàn)。因此,算法設(shè)計與分析是計算機科學與技術(shù)的一個核心問題。
算法是解題的步驟,我們可以把算法定義成解一確定類問題的任意一種特殊的方法。在計算機科學中,算法要用計算機算法語言描述,算法代表用計算機解一類問題的精確、有效的方法。算法+數(shù)據(jù)結(jié)構(gòu)=程序,求解一個給定的可計算或可解的問題,不同的人可以編寫出不同的程序,來解決同一個問題,這里存在兩個問題:一是與計算方法密切相關(guān)的算法問題;二是程序設(shè)計的技術(shù)問題。算法和程序之間存在密切的關(guān)系。算法是一組有窮的規(guī)則,它們規(guī)定了解決某一特定類型問題的一系列運算,是對解題方案的準確與完整的描述。制定一個算法,一般要經(jīng)過設(shè)計、確認、分析、編碼、測試、調(diào)試、計時等階段。對算法的學習包括五個方面的內(nèi)容:
① 設(shè)計算法。算法設(shè)計工作是不可能完全自動化的,應學習了解已經(jīng)被實踐證明是有用的一些基本的算法設(shè)計方法,這些基本的設(shè)計方法不僅適用于計算機科學,而且適用于電氣工程、運籌學等領(lǐng)域。
② 表示算法。描述算法的方法有多種形式,例如自然語言和算法語言,各自有適用的環(huán)境和特點。
③確認算法。算法確認的目的是使人們確信這一算法能夠正確無誤地工作,即該算法具有可計算性。正確的算法用計算機算法語言描述,構(gòu)成計算機程序,計算機程序在計算機上運行,得到算法運算的結(jié)果。
④ 分析算法。算法分析是對一個算法需要多少計算時間和存儲空間作定量的分析。分析算法可以預測這一算法適合在什么樣的環(huán)境中有效地運行,對解決同一問題的不同算法的有效性作出比較。
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 9 頁
⑤ 驗證算法。用計算機語言描述的算法是否可計算、有效合理,須對程序進行測試,測試程序的工作由調(diào)試和作時空分布圖組成。
而算法具有一定的特性,它包括:
① 確定性。算法的每一種運算必須有確定的意義,該種運算應執(zhí)行何種動作應無二義性,目的明確。
② 能行性。要求算法中有待實現(xiàn)的運算都是基本的,每種運算至少在原理上能由人用紙和筆在有限的時間內(nèi)完成。
③ 輸入。一個算法有0個或多個輸入,在算法運算開始之前給出算法所需數(shù)據(jù)的初值,這些輸入取自特定的對象集合。
④ 輸出。作為算法運算的結(jié)果,一個算法產(chǎn)生一個或多個輸出,輸出是同輸入有某種特定關(guān)系的量。
⑤ 有窮性。一個算法總是在執(zhí)行了有窮步的運算后終止,即該算法是可達的。滿足前四個特性的一組規(guī)則不能稱為算法,只能稱為計算過程,操作系統(tǒng)是計算過程的一個例子,操作系統(tǒng)用來管理計算機資源,控制作業(yè)的運行,沒有作業(yè)運行時,計算過程并不停止,而是處于等待狀態(tài)。
算法的復雜性是算法效率的度量,在評價算法性能時,復雜性是一個重要的依據(jù)。算法的復雜性的程度與運行該算法所需要的計算機資源的多少有關(guān),所需要的資源越多,表明該算法的復雜性越高;所需要的資源越少,表明該算法的復雜性越低。計算機的資源,最重要的是運算所需的時間和存儲程序和數(shù)據(jù)所需的空間資源,算法的復雜性有時間復雜性和空間復雜性之分。
算法在計算機上執(zhí)行運算,需要一定的存儲空間存放描述算法的程序和算法所需的數(shù)據(jù),計算機完成運算任務(wù)需要一定的時間。根據(jù)不同的算法寫出的程序放在計算機上運算時,所需要的時間和空間是不同的,算法的復雜性是對算法運算所需時間和空間的一種度量。不同的計算機其運算速度相差很大,在衡量一個算法的復雜性要注意到這一點。
對于任意給定的問題,設(shè)計出復雜性盡可能低的算法是在設(shè)計算法時考慮的一個重要目標。另外,當給定的問題已有多種算法時,選擇其中復雜性最低者,是在選用算法時應遵循的一個重要準則。因此,算法的復雜性分析對算法的設(shè)計或選用有著重要的指導意義和實用價值。
學院畢業(yè)設(shè)計(論文)譯文專用紙 第 10 頁
原文: 出處:
Visual Basic language and arithmetic The United States launched the Microsoft Visual Basic(may be referred to VB), is the latest version of the current VB 2008 Beta2(VB9)Chinese version.Visual meaning the visual, visible, referring to the development of operating systems like windows graphical user interface(Graphic User Interface, GUI)method, it does not need to prepare a large number code to describe the appearance of the interface elements and location, as long as the pre-The establishment of good drag and drop objects on the screen corresponding to the location.Basic is actually an abbreviation of the phrase;this phrase is Beginners all-purpose symbolic instruction code, the Chinese meaning “to the initial directive GM symbol code language.”
Visual Basic learning, Professional Edition and Enterprise Edition versions to meet the different needs of the development.Study and apply to the ordinary version of the majority of learners and the use of Visual Basic development of the general staff of Windows applications, but;professional version for computer professional development of staff, including the study of functional version of the full content control and Internet development tools such as advanced features ,Enterprise contain not only all the professional version of the content, there are automated tools such as Component Manager, professional programmers to make the development of a powerful group essence of distributed applications.Visual Basic
Section 1 the summary of Visual Basic
Microsoft Visual Basic,(abbreviate VB)as tool the most of application program one of under Windows operating platform.No matter beginner or professional developer, VB has all offered a whole set of tools to them, Development application program that it can be relaxed and convenient.So VB as most computer first-selected the ABC of programming language of beginner.學院畢業(yè)設(shè)計(論文)譯文專用紙 第 11 頁
“ Visual” mean method to adopt visual user of development figure interface(GUI), need and write a large number of code go and describe interface appearance and position of element seldom, Tow and show controlling part that need corresponding position to get screen can help figure design interface, user of figure,;“ Basic” means BASIC language, because VB is developed on the basis of already existing BAISC language.VB is a kind of programming language in common use of Microsoft, It, including VBA of the numerous Windows application software use VB language in Microsoft Excel, Microsoft Accessed., For users to carry on the secondary development;Make web page use more VBScript script language sub collection of VB too at present.Utilize data of VB visit characteristic user can establish the data base to most data base forms including Microsoft SQL Server and other enterprises data base With the application program of front, and adjustable service end part.Utilize ActiveX(TM)technology, VB can use word processor, electronic data list he Windows function that application program offers extremely, Excel of Microsoft, Word of Microsoft, Even can use by VB specialty edition or enterprise application program and target that edition establish directly.The procedure that users established finally is a real.EXE file , can issue freely.VB offer study edition, the specialty edition and enterprise edition, use to satisfied with different development demands.Study edition make programming personnel develop Windows and Windows application program of NT very easily.The specialty edition has offered the developing instrument with complete function to programming personnel of the specialty, Include studying all functions of edition in the specialty edition.Enterprise edition allow the professional personnel to establish strong distributed application program in the form of group.It includes all characteristics of the specialty edition.So can choose different editions according to different needs.Section 2 integrated development environments
Integrated environment of VB call IDE, made up of a lot of parts , include title board, menu fence, tool fence, controlling part case, And window body window, 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 12 頁
engineering management device window, attribute window, code window and window body overall arrangement window body overall arrangement, etc.of designing etc..Have covered all functions, such as design which develops the application program, editting, compiling and debugging, etc..In VB, the application program calls the project too.When start VB and open a new project for the first time, can see and pursue integrated development environment interface that show.Visual Basic Integrated development environment
VB come and organize development of application program through project, use project come and manage and form files of application program.One project uses the environment to make up by several window bodies, standard module generally.The system manages project through the project menu, for instance add the window body, quote.System allow turn on and manage a lot of projects besides.Section 3 Visual Basic language brief introductions
Basic use and do the elementary high-level language that used often most.Its full name is Beginner' s All-purpose Symbolic Instruction Code, abbreviate as BASIC.As its name suggests, Basic one specially for language that beginner design, because it easy to learn easy to know, So the body is popular.Early Basic language to belong to and solve translating type, so can carry out line by line , So it can see the result carried out at once , this is a very convenient design for beginner.But it have concept of structure either, one that is in procedure maintain and management have as much as other language problems.But back-end Basic correct shortcoming of the above(such as Quick Basic), make it may used for and develop the large-scaler procedure too.The language is the basic composition, which forms VB procedure.VB has stipulated the form of sentences and function.Grammar:
The sentence defines incantations [Sentence body]
Sentence define agree with and used in fixed function of sentence, sentence body appoint concrete content or want concrete operation that carry out of sentence.All set of sentence VB language, carry on with VB sentence organic association finish a 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 13 頁
certain specific function the procedure.Interface + procedure can solve a certain application problem.VB application program code window write in“ code editing machine” generally.“ editing machine of code” is like the word processing software of a piece of height specialization, there are many easies function of writing VB code, Pursue to show [Example Ex-Hello ]In“ code editing machine” code that window written.“Editing machine of code” window
Section 4 develop the application program with Visual Basic
Use VB programming, design appearance of application program first generally, write every target procedure code or other treatment procedure of incident respectively, Work of programming should be light more.The procedure of establishing the application program is as follows: Establish application program interface
The interface is the mutual bridge of user and procedure, Generally formed of window body and vision frame of the button, menu, text frameset.with standard WINDOWS interface of application program that VB establish.Require according to function of procedure and user and need of information interchange of procedure, Come to confirm that need those targets , plan the overall arrangement of the interface.2.Design by each attributes of target in interface
Demand and set up each attribute of target such as appearance, name, size of targeted.according to interface of planning.Most attribute person who fetch can set up through the attribute window when design already, Too can set up revising when operating in procedure through programming in procedure code.Have the targets respond programming by procedure code
3.Respond procedure code of programming target
Interface determine appearance of procedure only, design window add codes through“ code editing machine” soon after the interface, Realize some make the tasks, such as responding, information processing,etc.after accepting external message, Add 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 14 頁
code , realize some response, information processing that make after accepting external information task, As editor's window of code pursued shows add codes
“code editing machine” window
4.Keep project
One VB procedure one project, at the time of designing a application program, system will set up one be expanded and called.Project file of vbp, project file include all relevant information of file that project set up this, Keep project keep associated documents of project this at the same time.For example the window body produced when design interfaces is kept and being expanded and being called.Frm sum.In the window body of foxfire.At the time of opening a project(file), this project relevant files load at the same time.5.Operate and debugged by procedure
Operate the procedure thoroughpin operate“ selecting in the menu, when the mistake appears, VB system can offer information prompt can looked for and get rid of the mistake thoroughpin debug” within operate“ menus too.6.Can produce by executive program
For make procedure can break away from VB environment, order to become next life through” file“" producing project 1.exe” of menu but executive program(eyeful), Can carry out this file directly after this.In produce, + executive program, and then through install guide bale all associated documents, Can run independently after installation under the environment of windows 9 x/2000 as a software product.In computer system's any software, is by the every large or small each kind of software constituent constitution, defers to the specific algorithm to realize respectively, the algorithm quality direct decision realizes the software performance fit and unfit quality.Designs the algorithm with any method, what resources designs the algorithm to need, requires how many running time, how many storage space, how to determine an algorithm the quality, when realizes a software, is must give to solve.In computer system's operating system, the language compiling system, the database management system as well as in various computer application system's software, must use each one concrete algorithm to realize.Therefore, the algorithm design and 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 15 頁
the analysis are the computer science and a technical core question.The algorithm is the problem-solving step, we may define the algorithm Cheng Jie a determination class question the random one special method.In the computer science, the algorithm needs to use the computer algorithmic language to describe, the algorithm represents with the computer solves a kind of question precisely, the effective method.The algorithm construction of data = procedure, solves one to assign may calculate or the solvable question, the different person may compile the different procedure, solves the identical problem, here has two problems: First, with computational method close related algorithm question;Second, programming technical question.Between the algorithm and the procedure has the close relationship.The algorithm is a group has the poor rule, they had stipulated solves some specific type question a series of operations, is to the problem solving plan accurate and the complete description.Formulates an algorithm, generally must pass through stages and so on design, confirmation, analysis, code, test, debugging, time.To algorithm study including five aspect contents: ① Design algorithm.The algorithm design work is impossible completely the automation, should study the understanding already by the practice to prove that was the useful some basic algorithm design method, these basic design method was not only suitable for the computer science, moreover was suitable for domains and so on electrical engineering, operations research;② Expresses the algorithm.The description algorithm's method has many kinds of forms, for example the natural language and the algorithmic language, have the suitable environment and the characteristic respectively;③Confirms the algorithm.The algorithm confirmed the goal is causes the people to believe firmly that this algorithm can work unmistakably correctly, namely this algorithm has the circularity.The correct algorithm describes with the computer algorithmic language, constitutes the computer program, the computer program moves on the computer, obtains the algorithm operation result;④ Parsing algorithm.The algorithmic analysis is requires how many computing time and the storage space to an algorithm makes the quota the analysis.The parsing 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 16 頁
algorithm may forecast that what environment this algorithm does suit in moves effectively, to solves the identical question different algorithm validity to make the comparison;⑤ Confirmation algorithm.With machine language description algorithm whether can calculate effectively, reasonable, must carry on the test to the procedure, the test order work and makes the space and time distribution map by the debugging to be composed.But the algorithm has certain characteristic, it includes: ① Determinism.Algorithm each kind of operation must have the determination significance, this kind of operation should carry out what kind of movement should not to have the ambiguity, the goal is clear;② Effectiveness.Requests the operation which in the algorithm waits for realizing is basic, each kind of operation can at least completes in the principle by the human with the paper and the pen in the limited time;③ Input.An algorithm has 0 or the many inputs, before the algorithm operation starts gives the algorithm to need the data the starting value, these inputs are from the specific object set;④ Output.Does for the algorithm operation result, an algorithm has or many outputs, the output has some kind of specific relational quantity with the input;⑤ Has poor.An algorithm always after carrying out had the poor step operation has terminated, namely this algorithm was may reach.Satisfies a first four characteristic group of rule not to be able to be called the algorithm, can only be called the computational process, the operating system is a computational process example, the operating system uses for to manage the computer resources, controls the manufacture industry movement, when has not made industry the movement, the computational process does not stop, but is at the waiting status.The algorithm complexity is the algorithm efficiency measure, when appraises the algorithm performance, the complexity is an important basis.The algorithm complex degree with moves computer resources how many which this algorithm 學院畢業(yè)設(shè)計(論文)譯文專用紙 第 17 頁
needs related, needs the resources are more, indicated that this algorithm the complexity is higher;Needs the resources are less, indicated that this algorithm the complexity is lower.The spatial resources, which computer’s resources, operate most importantly, needs the time which and the stored routine and the data need, the algorithm complexity has division time complexity and the spatial complexity.The algorithm carries out the operation on the computer, needs the data which certain storage space depositing description algorithm the procedure and the algorithm need, the computer completes the operation task to require certain time.The procedure which writes according to the different algorithm places when on the computer operates, needs the time and the space are different, the algorithm complexity is needs the time and the spatial one kind of measure to the algorithm operation.The different computer its operating speed difference is very big, is weighing an algorithm the complexity to note this point.Regarding question, which assigns willfully, a profitable target which designs, the complex low algorithm is as far as possible when designs algorithm considered.Moreover, when the question, which assigns already when has many kinds of algorithms, an important criterion which choice complexity low, is when selects algorithm should follow.Therefore, the algorithm complex analysis or selects to the algorithm design has the important guiding sense and the use value.
第五篇:圖書管理系統(tǒng) 項目開發(fā)計劃書
項目開發(fā)計劃書
1、引言
1.1 編寫目的1.2 背景
1.3 定義
1.4 參考資料
2、項目概述
2.1 工作內(nèi)容
2.2 主要參加人員
2.3 產(chǎn)品及成果
2.4 驗收標準
2.5 本計劃的審核者與批準者
3、實施計劃
3.1 工作任務(wù)的分解與人員的分工
3.2 預算
3.3 關(guān)鍵問題
4、支持條件
4.1 計算機系統(tǒng)支持
4.2 需要用戶承擔的工作
5、交付期限
1、引言
1.1 編寫目的項目開發(fā)的目的是為了對問題進行研究,以最小的代價在最短的時間內(nèi)確定問題是否可解。
經(jīng)過對此項目進行詳細調(diào)查研究,初擬系統(tǒng)實現(xiàn)報告,對軟件開發(fā)中將要面臨的問題及其解決方案進行初步設(shè)計及合理安排。明確開發(fā)風險及其所帶來的經(jīng)濟效益。
1.2 背景
開發(fā)軟件名稱:
圖書管理系統(tǒng)
項目任務(wù)提出者:
XXX XXX XXX
項目開發(fā)者:
XXX XXX XXX
用戶:
圖書館管理人員與師生
實現(xiàn)軟件的單位:
XXX XXX XXX
項目與其他軟件,系統(tǒng)的關(guān)系:
該系統(tǒng)屬于客戶端形式的應用程序,以方便前來師生尋找自己喜愛的書籍,為達到統(tǒng)一性,標準化,數(shù)據(jù)的定義,組織也要與數(shù)據(jù)庫系統(tǒng)等底層支持系統(tǒng)相統(tǒng)一。
1.3 定義
403 圖書管理系統(tǒng)是用戶尋找書籍的理想平臺,此系統(tǒng)能更為簡單、方便提供借書的朋友使用。
1.4 參考文獻
《管理信息系統(tǒng)》
《管理信息系統(tǒng)指導書》
《管理信息系統(tǒng)案例分析》
2、項目概述
2.1 工作內(nèi)容
圖書管理系統(tǒng),根據(jù)用戶的不同,需要實現(xiàn)如下功能:
(1)提供采編人員進行書籍采集。
(2)為用戶提供圖書檢索服務(wù)。
(3)用戶的資料記錄與用戶歸還圖書的功能。
(4)系統(tǒng)維護功能:書類、圖書。
2.2 主要參加人員
陳才記、梁毅俊、林宇、葉兆華
2.3 產(chǎn)品及成果
2.3.1 程序
圖書管理系統(tǒng)程序包和SQL Server數(shù)據(jù)庫
2.3.2 文檔
1.可行性分析報告內(nèi)部保存
2.項目開發(fā)計劃書內(nèi)部保存
3.需求規(guī)格說明書內(nèi)不保存/客戶評審
4.概要設(shè)計說明書內(nèi)部保存/發(fā)布
5.詳細設(shè)計說明書內(nèi)部保存/發(fā)布
6.測試計劃書內(nèi)部保存
2.4 驗收標準
各個功能均能正常使用。
2.6 本計劃的審核者與批準者
文明瑤老師(軟件工程任課老師)。
3、實施計劃
3.1 工作任務(wù)的分解與人員的分工
組長:XX(項目經(jīng)理)
組員:XXX(工程師)
XX(技術(shù)經(jīng)理)
XXX(程序員)
在項目開發(fā)中,各有特長,擔任不同角色,發(fā)揮了必不可缺的作用。任務(wù)分配如下:
可行性研究報告XXX
項目開發(fā)計劃書 XXX
需求規(guī)格說明書XXX
概要設(shè)計說明書XXX
詳細設(shè)計說明書XXX
其它工作由全體組員每人承擔部分任務(wù),共同完成。
3.2 預算
1、基本建設(shè)投資30000元
2、其他一次性支出10000元
3、非一次性支出12000元
綜上共計52000元
3.3 關(guān)鍵問題
參與人員的團結(jié)精神以及積極的態(tài)度和系統(tǒng)分析設(shè)計實現(xiàn)的技術(shù)能力。
4、支持條件
4.1 計算機系統(tǒng)支持
本軟件開發(fā)需求的工作平臺是:PC主機
運行環(huán)境是:Windows
編程語言是:C#
數(shù)據(jù)庫是:SQL
4.2 需要用戶承擔的工作
提出對舊系統(tǒng)的意見和不足,并對新系統(tǒng)進行測試。
5、交付期限