版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、畢業(yè)設(shè)計(jì)(論文)外文文獻(xiàn)翻譯畢業(yè)設(shè)計(jì)(論文)題目理學(xué)院資料室管理系統(tǒng)翻譯題目(中文)visual basic 語(yǔ)言與算法翻譯題目(英文)visual basic language and arithmetic譯文:visual basic 語(yǔ)言與算法1991年,美國(guó)微軟公司推出了visual basic(可簡(jiǎn)稱(chēng)vb),目前的最新版本是vb 2008 beta2(vb9)中文版。visual 意即可視的、可見(jiàn)的,指的是開(kāi)發(fā)像windows操作系統(tǒng)的圖形用戶界面(graphic user interface,gui)的方法,它不需要編寫(xiě)大量代碼去描述界面元素的外觀和位置,只要把預(yù)先建立好的對(duì)象拖放
2、到屏幕上相應(yīng)的位置即可。basic 實(shí)際上是一個(gè)短語(yǔ)的縮寫(xiě),這個(gè)短語(yǔ)就是 beginners all_purpose symbolic instruction code ,其中文意思為“初始者通用符號(hào)指令代碼語(yǔ)言”。visual basic有學(xué)習(xí)版、專(zhuān)業(yè)版和企業(yè)版三種版本,以滿足不同的開(kāi)發(fā)需要。學(xué)習(xí)版適用于普通學(xué)習(xí)者及大多數(shù)使用visual basic開(kāi)發(fā)一般windows應(yīng)用程序的人員,但是;專(zhuān)業(yè)版適用于計(jì)算機(jī)專(zhuān)業(yè)開(kāi)發(fā)人員,包括了學(xué)習(xí)版的全部?jī)?nèi)容功能以及internet控件開(kāi)發(fā)工具之類(lèi)的高級(jí)特性;企業(yè)版除包含專(zhuān)業(yè)版全部的內(nèi)容外,還有自動(dòng)化構(gòu)件管理器等工具,使得專(zhuān)業(yè)編程人員能夠開(kāi)發(fā)功能強(qiáng)大的組
3、骨子里分布式應(yīng)用程序。visual basic 第1節(jié)visual basic的概述 microsoft visual basic(簡(jiǎn)稱(chēng)vb)是在windows操作平臺(tái)下設(shè)計(jì)應(yīng)用程序的最速度、最簡(jiǎn)捷的工具之一。不論是初學(xué)者還是專(zhuān)業(yè)開(kāi)發(fā)人員,vb都為他們提供了一整套的工具,可以輕松方便的開(kāi)發(fā)應(yīng)用程序。因此,vb一直被作為大多數(shù)電腦初學(xué)者的首選入門(mén)編程語(yǔ)言。 “visual”指的是采用可視化的開(kāi)發(fā)圖形用戶界面(gui)的方法,一般不需要編寫(xiě)大量代碼去描述界面元素的外觀和位置,而只要把需要的控件拖放到屏幕上的相應(yīng)位置即可方便圖形設(shè)計(jì)圖形用戶界面;“basic”指的是 basic語(yǔ)言,因?yàn)関b是在原有
4、的baisc語(yǔ)言的基礎(chǔ)上發(fā)展起來(lái)的。 vb是 microsoft的一種通用程序設(shè)計(jì)語(yǔ)言,它包括在 microsoft excel、microsoft access等眾多windows應(yīng)用軟件中的vba都使用vb語(yǔ)言,以供用戶進(jìn)行二次開(kāi)發(fā);目前制作網(wǎng)頁(yè)使用較多的vbscript腳本語(yǔ)言也是vb的子集。 利用vb的數(shù)據(jù)訪問(wèn)特性用戶可以對(duì)包括 microsoft sql server和其他企業(yè)數(shù)據(jù)庫(kù)在內(nèi)的大部分?jǐn)?shù)據(jù)庫(kù)格式創(chuàng)建數(shù)據(jù)庫(kù)和前端應(yīng)用程序,以及可調(diào)整的服務(wù)端部件。利用activex(tm)技術(shù),vb可使用 microsoft word字處理器、microsoft excel電子數(shù)據(jù)表極其他wi
5、ndows應(yīng)用程序提供的功能,甚至可直接使用由vb專(zhuān)業(yè)版或企業(yè)版創(chuàng)建的應(yīng)用程序和對(duì)象。 用戶最終創(chuàng)建的程序是一個(gè)真正的.exe文件,可以自由發(fā)布。 vb提供了學(xué)習(xí)版,專(zhuān)業(yè)版和企業(yè)版,用以滿足不同的開(kāi)發(fā)需求。學(xué)習(xí)版使編程人員很容易地開(kāi)發(fā)windows和windows nt的應(yīng)用程序。專(zhuān)業(yè)版為專(zhuān)業(yè)編程人員提供了功能完備的開(kāi)發(fā)工具,專(zhuān)業(yè)版中包含了學(xué)習(xí)版的所有功能。企業(yè)版允許專(zhuān)業(yè)人員以小組的形式來(lái)創(chuàng)建強(qiáng)大的分布式應(yīng)用程序。它包括專(zhuān)業(yè)版的所有的特性。所以可以根據(jù)不同的需要來(lái)選擇不同的版本。 第2節(jié)集成開(kāi)發(fā)環(huán)境 vb的集成環(huán)境或稱(chēng)ide,由多個(gè)部分組成,包含了標(biāo)題欄、菜單欄、工具欄、控件箱,以及窗體設(shè)計(jì)器
6、窗口、工程管理器窗口、屬性窗口、代碼窗口和窗體布局窗體布局等。覆蓋了開(kāi)發(fā)應(yīng)用程序的設(shè)計(jì)、編輯、編譯和調(diào)試等所有功能。 在vb中,應(yīng)用程序也稱(chēng)工程。當(dāng)?shù)谝淮螁?dòng)vb并打開(kāi)一個(gè)新工程時(shí),可以看到如圖所示的集成開(kāi)發(fā)環(huán)境界面。 visual basic 集成開(kāi)發(fā)環(huán)境 vb通過(guò)工程來(lái)組織應(yīng)用程序的開(kāi)發(fā),使用工程來(lái)管理構(gòu)成應(yīng)用程序的所有文件。一個(gè)工程一般由若干個(gè)窗體、標(biāo)準(zhǔn)模塊以及應(yīng)用環(huán)境組成。系統(tǒng)通過(guò)工程菜單來(lái)對(duì)工程進(jìn)行管理,如添加窗體、引用等。系統(tǒng)允許同時(shí)打開(kāi)和管理多個(gè)工程。 第3節(jié)visual basic語(yǔ)言簡(jiǎn)介 basic是最常被用來(lái)做入門(mén)使用的高級(jí)語(yǔ)言。它的全名是 beginners all-pu
7、rpose sumbolic instruction code,簡(jiǎn)稱(chēng)為 basic。顧名思義,basic就是一種專(zhuān)為初學(xué)者設(shè)計(jì)的語(yǔ)言,因其易學(xué)易懂,所以身受歡迎。早期的basic語(yǔ)言都是屬于解譯式的,因此可以一行一行地執(zhí)行,所以它可以立刻看到執(zhí)行的結(jié)果,對(duì)初學(xué)者來(lái)說(shuō)這是很方便的設(shè)計(jì)。不過(guò)它也因此沒(méi)有結(jié)構(gòu)化的概念,在程序的維護(hù)及管理上比起其他語(yǔ)言困難許多。不過(guò)在后期的basic則改正了以上的缺點(diǎn)(如quick basic),使得它也可以用來(lái)開(kāi)發(fā)較大型的程序。 語(yǔ)言是構(gòu)成vb程序的基本成分。vb規(guī)定了語(yǔ)句格式和功能。 語(yǔ)法: 語(yǔ)句定義符語(yǔ)句體 語(yǔ)句定義符用于規(guī)定語(yǔ)句的功能,語(yǔ)句體指定語(yǔ)句的具體內(nèi)容
8、或要執(zhí)行的具體操作。所有語(yǔ)句的集合就是vb語(yǔ)言,用vb語(yǔ)句進(jìn)行有機(jī)組合完成某個(gè)特定功能就是程序。界面+程序就能解決某個(gè)應(yīng)用問(wèn)題。 vb應(yīng)用程序代碼一般在“代碼編輯器”窗口編寫(xiě)?!按a編輯器”像是一個(gè)高度專(zhuān)門(mén)化的字處理軟件,有很多便于編寫(xiě)vb代碼的功能,圖所示為例ex-hello在“代碼編輯器”窗口編寫(xiě)的代碼。 “代碼編輯器”窗口 第4節(jié)用visual basic開(kāi)發(fā)應(yīng)用程序 使用vb編程,一般先設(shè)計(jì)應(yīng)用程序的外觀,然后再分別編寫(xiě)各對(duì)象事件的程序代碼或其他處理程序,編程的工作要輕松多。 創(chuàng)建應(yīng)用程序的步驟如下: 1 創(chuàng)建應(yīng)用程序界面 界面是用戶和程序交互的橋梁,用vb創(chuàng)建的標(biāo)準(zhǔn)的windows應(yīng)
9、用程序的界面一般由窗體和按鈕、菜單、文本框的圖象框等構(gòu)成。根據(jù)程序的功能要求和用戶與程序之間的信息交流的需要,來(lái)確定需要那些對(duì)象,規(guī)劃界面的布局。 2 設(shè)計(jì)界面上各個(gè)對(duì)象的屬性 根據(jù)規(guī)劃的界面要求設(shè)置各個(gè)對(duì)象的屬性,比如對(duì)象的外貌、名稱(chēng)、顏色、大小等。 大多數(shù)屬性取值既可以在設(shè)計(jì)時(shí)通過(guò)屬性窗口來(lái)設(shè)置,也可以在程序代碼中通過(guò)編程在程序運(yùn)行時(shí)設(shè)置修改。 3 編程對(duì)象響應(yīng)的程序代碼 界面僅僅決定了程序的外觀,設(shè)計(jì)完界面后就要通過(guò)“代碼編輯器” 窗口來(lái)添加代碼,實(shí)現(xiàn)一些在接受外界信息后作出響應(yīng)、信息處理等任務(wù),添加代碼,實(shí)現(xiàn)一些在接受外界信息后作出的響應(yīng)、信息處理等任務(wù),添加代碼如圖的代碼編輯窗口所示
10、 “代碼編輯器”窗口 4 保存工程 一個(gè)vb程序就是一個(gè)工程,在設(shè)計(jì)一個(gè)應(yīng)用程序時(shí),系統(tǒng)會(huì)建立一個(gè)擴(kuò)展名為.vbp的工程文件,工程文件包含了該工程所建立的所有文件的相關(guān)信息,保存工程就同時(shí)保存了該工程的所有相關(guān)文件。比如當(dāng)設(shè)計(jì)界面時(shí)產(chǎn)生的窗體保存在擴(kuò)展名為.frm和.frx的窗體文件中。在打開(kāi)一個(gè)工程(文件)時(shí),該工程有關(guān)的所有文件同時(shí)被裝載。 5 行和調(diào)試程序 通過(guò)“運(yùn)行”菜單中的選項(xiàng)來(lái)運(yùn)行程序,當(dāng)出現(xiàn)錯(cuò)誤時(shí), vb系統(tǒng)可以提供信息提示也可通過(guò)“調(diào)試”和“運(yùn)行”菜單來(lái)查找和排除錯(cuò)誤。 6生成可執(zhí)行程序 為了使程序可以脫離vb環(huán)境,通過(guò)“文件”菜單中的“生成工程1.exe”命令來(lái)生成可執(zhí)行程序
11、(.exe文件),此后即可直接執(zhí)行該文件。在生成可+執(zhí)行程序后,再通過(guò)安裝向?qū)⑺邢嚓P(guān)文件打包,就可以作為一個(gè)軟件產(chǎn)品在windows 9x/2000 環(huán)境下安裝后獨(dú)立運(yùn)行vb的數(shù)據(jù)庫(kù)編程方面按其難易程度可分為三類(lèi)(由易到難);使用數(shù)據(jù)庫(kù)控制項(xiàng)和綁定控制項(xiàng)使用數(shù)據(jù)庫(kù)對(duì)象變量進(jìn)行編程直接調(diào)用odbc2.0api在使用vb進(jìn)行數(shù)據(jù)庫(kù)編程時(shí),通常,會(huì)首先選擇三種基本方法之一來(lái)進(jìn)行數(shù)據(jù)庫(kù)應(yīng)用程序的方案設(shè)計(jì), 現(xiàn)在就將以上三種設(shè)計(jì)方法的適應(yīng)范圍及其優(yōu)缺點(diǎn)進(jìn)行一個(gè)比較。1 使用數(shù)據(jù)庫(kù)控制項(xiàng)和綁定控制項(xiàng)1.1優(yōu)點(diǎn)它是三種方法中編碼量最小的不必了解cdbc2.0api的細(xì)節(jié)允許使用標(biāo)準(zhǔn)的和第三方廠商制訂的控
12、制項(xiàng)簡(jiǎn)化了錯(cuò)誤處理 支持所有的動(dòng)態(tài)集方法及屬性1.2缺點(diǎn)不能存取快照對(duì)象(snapshop)對(duì)象或表格對(duì)象(都屬于記錄集對(duì)象)不能存取數(shù)據(jù)庫(kù)集合,比如表定義(tabledefs)字段(fieds),索引( indexes)及查詢定義(querydefs) 只能存取部分odbc2.0管理函數(shù) 不能進(jìn)行真正的事務(wù)處理 有限的錯(cuò)誤診斷功能1.3應(yīng)用 對(duì)中小規(guī)模的數(shù)據(jù)庫(kù)表(通常少于一千條記錄)只進(jìn)行簡(jiǎn)章的瀏覽操作 基本sql查詢所對(duì)應(yīng)的結(jié)果集長(zhǎng)度有限(通常結(jié)果集的記錄數(shù)小于一百, 這些記錄從一個(gè)或兩個(gè)長(zhǎng)度有限的表中檢索出來(lái)) 應(yīng)用程序的數(shù)據(jù)輸入/輸出項(xiàng)較少(通常只涉及一個(gè)或兩個(gè)長(zhǎng)度有限的表、并且表中的
13、字段數(shù)在10個(gè)左右且不具有關(guān)系完整性限制2 使用數(shù)據(jù)庫(kù)對(duì)象變量進(jìn)行編程2.1 優(yōu)點(diǎn)可以在程序中存取odbc2.0的管理函數(shù)可以控制多種記錄集類(lèi)型:dynaset、snapshop及table記錄集合對(duì)象可以存取存儲(chǔ)過(guò)程和查詢動(dòng)作可以存取數(shù)據(jù)庫(kù)集合對(duì)象,例如tabledefs、fields、indexes及querydefs具有真正的事務(wù)處理能力 , 包括啟動(dòng)事務(wù) ( begintrans) 、 提交事務(wù)(committrans)及回滾事務(wù)(rollback)2.2 缺點(diǎn)比使用數(shù)據(jù)控制項(xiàng)的方法編碼量較大只能進(jìn)行間接的錯(cuò)誤處理和錯(cuò)誤恢復(fù)對(duì)每個(gè)數(shù)據(jù)庫(kù)操作沒(méi)有細(xì)粒度的控制對(duì)結(jié)果集和包含結(jié)果集的內(nèi)豐資源
14、的操作受到限制同直接使用odbc2.0api函數(shù)的方法相比性能較低2.3 應(yīng)用應(yīng)用程序需要在執(zhí)行期間動(dòng)態(tài)地建立表、字段及索引.應(yīng)用程序涉及同步更新幾張表(但在邏輯上保持一致性)的復(fù)雜事務(wù)應(yīng)用程序使用結(jié)果集而不是dynaset的窗體(forms),例如snapshots或tables,這里是設(shè)計(jì)要考慮的關(guān)鍵應(yīng)用程序的表非常大,多于1000條記錄應(yīng)用程序具有復(fù)雜的數(shù)據(jù)輸入/輸出項(xiàng),它涉及許多內(nèi)部相關(guān)的字段并且包括數(shù)據(jù)庫(kù)參照完整性或一致性規(guī)則應(yīng)用程序需要執(zhí)行一些額外的操作和對(duì)結(jié)果集的查詢后處理, 尤其是需要很高的數(shù)據(jù)格式化顯示應(yīng)用程序需要利用復(fù)雜的odbc管理功能以選擇、配置、校驗(yàn)及建立各種數(shù)據(jù)源應(yīng)
15、用程序需要在執(zhí)行期間“顯示”數(shù)據(jù)庫(kù)的基本結(jié)構(gòu)應(yīng)用程序需要使用復(fù)雜的多碼索引方式來(lái)檢索或更新記錄3 直接調(diào)用odbc2.0api3.1 優(yōu)點(diǎn)可以直接參與結(jié)果集的開(kāi)發(fā)、管理及規(guī)范化對(duì)結(jié)果集游標(biāo)提供了更多的控制,并且提供了更多的游標(biāo)類(lèi)型和執(zhí)行動(dòng)作能夠確定odbc驅(qū)動(dòng)程序及sql的一致性級(jí)別可以更好地控制windows的執(zhí)行調(diào)度及資源利用其他方面同其他方法差不多,因此這種方法很可能具有最好的性能3.2 缺點(diǎn)較其他兩種方法需要大量的代碼代碼復(fù)雜并且要求程序員具有編制api調(diào)用的經(jīng)驗(yàn)在網(wǎng)絡(luò)上visual basic運(yùn)行期間庫(kù)的錯(cuò)誤處理缺乏安全性,因此代碼運(yùn)行期間出現(xiàn)的錯(cuò)誤所造成的后果會(huì)非常嚴(yán)重3.3 應(yīng)用
16、如果系統(tǒng)環(huán)境為客戶機(jī)/服務(wù)器模式下的大規(guī)模多用戶環(huán)境,那么應(yīng)用程序必須都能夠準(zhǔn)確地解決可能出現(xiàn)的系統(tǒng)錯(cuò)誤和失敗應(yīng)用程序強(qiáng)調(diào)資源使用,這里如何對(duì)內(nèi)存、 網(wǎng)絡(luò)服務(wù)器資源進(jìn)行直接控制是首要的考慮因素應(yīng)用程序使用超大規(guī)模數(shù)據(jù)庫(kù),例如數(shù)據(jù)庫(kù)表可能包含幾萬(wàn)或幾十萬(wàn)條記錄計(jì)算機(jī)系統(tǒng)中的任何軟件,都是由大大小小的各種軟件組成部分構(gòu)成,各自按照特定的算法來(lái)實(shí)現(xiàn),算法的好壞直接決定所實(shí)現(xiàn)軟件性能的優(yōu)劣。用什么方法來(lái)設(shè)計(jì)算法,所設(shè)計(jì)算法需要什么樣的資源,需要多少運(yùn)行時(shí)間、多少存儲(chǔ)空間,如何判定一個(gè)算法的好壞,在實(shí)現(xiàn)一個(gè)軟件時(shí),都是必須予以解決的。計(jì)算機(jī)系統(tǒng)中的操作系統(tǒng)、語(yǔ)言編譯系統(tǒng)、數(shù)據(jù)庫(kù)管理系統(tǒng)以及各種各樣的計(jì)算
17、機(jī)應(yīng)用系統(tǒng)中的軟件,都必須用一個(gè)個(gè)具體的算法來(lái)實(shí)現(xiàn)。因此,算法設(shè)計(jì)與分析是計(jì)算機(jī)科學(xué)與技術(shù)的一個(gè)核心問(wèn)題。算法是解題的步驟,我們可以把算法定義成解一確定類(lèi)問(wèn)題的任意一種特殊的方法。在計(jì)算機(jī)科學(xué)中,算法要用計(jì)算機(jī)算法語(yǔ)言描述,算法代表用計(jì)算機(jī)解一類(lèi)問(wèn)題的精確、有效的方法。算法+數(shù)據(jù)結(jié)構(gòu)=程序,求解一個(gè)給定的可計(jì)算或可解的問(wèn)題,不同的人可以編寫(xiě)出不同的程序,來(lái)解決同一個(gè)問(wèn)題,這里存在兩個(gè)問(wèn)題:一是與計(jì)算方法密切相關(guān)的算法問(wèn)題;二是程序設(shè)計(jì)的技術(shù)問(wèn)題。算法和程序之間存在密切的關(guān)系。算法是一組有窮的規(guī)則,它們規(guī)定了解決某一特定類(lèi)型問(wèn)題的一系列運(yùn)算,是對(duì)解題方案的準(zhǔn)確與完整的描述。制定一個(gè)算法,一般要經(jīng)
18、過(guò)設(shè)計(jì)、確認(rèn)、分析、編碼、測(cè)試、調(diào)試、計(jì)時(shí)等階段。對(duì)算法的學(xué)習(xí)包括五個(gè)方面的內(nèi)容: 設(shè)計(jì)算法。算法設(shè)計(jì)工作是不可能完全自動(dòng)化的,應(yīng)學(xué)習(xí)了解已經(jīng)被實(shí)踐證明是有用的一些基本的算法設(shè)計(jì)方法,這些基本的設(shè)計(jì)方法不僅適用于計(jì)算機(jī)科學(xué),而且適用于電氣工程、運(yùn)籌學(xué)等領(lǐng)域。 表示算法。描述算法的方法有多種形式,例如自然語(yǔ)言和算法語(yǔ)言,各自有適用的環(huán)境和特點(diǎn)。確認(rèn)算法。算法確認(rèn)的目的是使人們確信這一算法能夠正確無(wú)誤地工作,即該算法具有可計(jì)算性。正確的算法用計(jì)算機(jī)算法語(yǔ)言描述,構(gòu)成計(jì)算機(jī)程序,計(jì)算機(jī)程序在計(jì)算機(jī)上運(yùn)行,得到算法運(yùn)算的結(jié)果。 分析算法。算法分析是對(duì)一個(gè)算法需要多少計(jì)算時(shí)間和存儲(chǔ)空間作定量的分析。分析
19、算法可以預(yù)測(cè)這一算法適合在什么樣的環(huán)境中有效地運(yùn)行,對(duì)解決同一問(wèn)題的不同算法的有效性作出比較。 驗(yàn)證算法。用計(jì)算機(jī)語(yǔ)言描述的算法是否可計(jì)算、有效合理,須對(duì)程序進(jìn)行測(cè)試,測(cè)試程序的工作由調(diào)試和作時(shí)空分布圖組成。而算法具有一定的特性,它包括: 確定性。算法的每一種運(yùn)算必須有確定的意義,該種運(yùn)算應(yīng)執(zhí)行何種動(dòng)作應(yīng)無(wú)二義性,目的明確。 能行性。要求算法中有待實(shí)現(xiàn)的運(yùn)算都是基本的,每種運(yùn)算至少在原理上能由人用紙和筆在有限的時(shí)間內(nèi)完成。 輸入。一個(gè)算法有0個(gè)或多個(gè)輸入,在算法運(yùn)算開(kāi)始之前給出算法所需數(shù)據(jù)的初值,這些輸入取自特定的對(duì)象集合。 輸出。作為算法運(yùn)算的結(jié)果,一個(gè)算法產(chǎn)生一個(gè)或多個(gè)輸出,輸出是同輸入有
20、某種特定關(guān)系的量。 有窮性。一個(gè)算法總是在執(zhí)行了有窮步的運(yùn)算后終止,即該算法是可達(dá)的。滿足前四個(gè)特性的一組規(guī)則不能稱(chēng)為算法,只能稱(chēng)為計(jì)算過(guò)程,操作系統(tǒng)是計(jì)算過(guò)程的一個(gè)例子,操作系統(tǒng)用來(lái)管理計(jì)算機(jī)資源,控制作業(yè)的運(yùn)行,沒(méi)有作業(yè)運(yùn)行時(shí),計(jì)算過(guò)程并不停止,而是處于等待狀態(tài)。算法的復(fù)雜性是算法效率的度量,在評(píng)價(jià)算法性能時(shí),復(fù)雜性是一個(gè)重要的依據(jù)。算法的復(fù)雜性的程度與運(yùn)行該算法所需要的計(jì)算機(jī)資源的多少有關(guān),所需要的資源越多,表明該算法的復(fù)雜性越高;所需要的資源越少,表明該算法的復(fù)雜性越低。計(jì)算機(jī)的資源,最重要的是運(yùn)算所需的時(shí)間和存儲(chǔ)程序和數(shù)據(jù)所需的空間資源,算法的復(fù)雜性有時(shí)間復(fù)雜性和空間復(fù)雜性之分。算法
21、在計(jì)算機(jī)上執(zhí)行運(yùn)算,需要一定的存儲(chǔ)空間存放描述算法的程序和算法所需的數(shù)據(jù),計(jì)算機(jī)完成運(yùn)算任務(wù)需要一定的時(shí)間。根據(jù)不同的算法寫(xiě)出的程序放在計(jì)算機(jī)上運(yùn)算時(shí),所需要的時(shí)間和空間是不同的,算法的復(fù)雜性是對(duì)算法運(yùn)算所需時(shí)間和空間的一種度量。不同的計(jì)算機(jī)其運(yùn)算速度相差很大,在衡量一個(gè)算法的復(fù)雜性要注意到這一點(diǎn)。對(duì)于任意給定的問(wèn)題,設(shè)計(jì)出復(fù)雜性盡可能低的算法是在設(shè)計(jì)算法時(shí)考慮的一個(gè)重要目標(biāo)。另外,當(dāng)給定的問(wèn)題已有多種算法時(shí),選擇其中復(fù)雜性最低者,是在選用算法時(shí)應(yīng)遵循的一個(gè)重要準(zhǔn)則。因此,算法的復(fù)雜性分析對(duì)算法的設(shè)計(jì)或選用有著重要的指導(dǎo)意義和實(shí)用價(jià)值。原文出處: visual basic language a
22、nd arithmeticthe 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 u
23、ser 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 ph
24、rase; 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 vers
25、ion 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
26、 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 basi
27、c 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 mo
28、st computer first-selected the abc of programming language of beginner. 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 co
29、rresponding 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 applic
30、ation 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 for
31、ms 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,
32、 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 sa
33、tisfied 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 f
34、unctions 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
35、 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, engineering management device window, attribute window, code window and window body overall arrangemen
36、t 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
37、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 b
38、y 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
39、 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 so
40、lve 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 co
41、rrect 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 sente
42、nce 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 certain specific function the procedure. interface + pro
43、cedure 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-h
44、ello 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
45、 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 f
46、rameset. 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 attribut
47、es 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 throug
48、h 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 a
49、s responding, information processing,etc. after accepting external message, add code , realize some response, information processing that make after accepting external information task, as editors window of code pursued shows add codes “code editing machine” window 4. keep project one vb procedure o
50、ne 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 win
51、dow 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 sel
52、ecting 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
53、 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 softwar
54、e product.in computer systems 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 wi
55、th 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 systems operating system, the language compiling system, the database managemen
56、t system as well as in various computer application systems software, must use each one concrete algorithm to realize. therefore, the algorithm design and the analysis are the computer science and a technical core question.the algorithm is the problem-solving step, we may define the algorithm cheng
57、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 dat
58、a = 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 clos
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度木制家具出口業(yè)務(wù)分包勞務(wù)合同3篇
- 體育中心2025年度灌溉系統(tǒng)專(zhuān)用化肥及農(nóng)藥供應(yīng)合同3篇
- 2025年度配電變壓器租賃與電網(wǎng)安全培訓(xùn)服務(wù)合同
- 二零二五年度新型民間借貸服務(wù)合同規(guī)范(2025版)
- 二零二五年度農(nóng)產(chǎn)品電商平臺(tái)入駐合同范本
- 二零二五年度民營(yíng)中小企業(yè)企業(yè)社會(huì)責(zé)任履行服務(wù)合同
- 二零二五年度工業(yè)廠房外墻鋁型板安裝與維護(hù)合同
- 二零二五年度美容美發(fā)店員工健康體檢服務(wù)合同2篇
- 二零二四年度新能源產(chǎn)業(yè)聯(lián)營(yíng)項(xiàng)目合同3篇
- 2025年水塘蓮藕種植承包與品牌推廣合作合同
- 南通市2025屆高三第一次調(diào)研測(cè)試(一模)地理試卷(含答案 )
- 2025年上海市閔行區(qū)中考數(shù)學(xué)一模試卷
- 2025中國(guó)人民保險(xiǎn)集團(tuán)校園招聘高頻重點(diǎn)提升(共500題)附帶答案詳解
- 重癥患者家屬溝通管理制度
- 法規(guī)解讀丨2024新版《突發(fā)事件應(yīng)對(duì)法》及其應(yīng)用案例
- IF鋼物理冶金原理與關(guān)鍵工藝技術(shù)1
- 銷(xiāo)售提成對(duì)賭協(xié)議書(shū)范本 3篇
- 勞務(wù)派遣招標(biāo)文件范本
- EPC項(xiàng)目階段劃分及工作結(jié)構(gòu)分解方案
- 《跨學(xué)科實(shí)踐活動(dòng)4 基于特定需求設(shè)計(jì)和制作簡(jiǎn)易供氧器》教學(xué)設(shè)計(jì)
- 信息安全意識(shí)培訓(xùn)課件
評(píng)論
0/150
提交評(píng)論