




已閱讀5頁,還剩33頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
畢畢 業(yè)業(yè) 設(shè)設(shè) 計計( 論論 文文) 模擬模擬 atm 機系統(tǒng)軟件的設(shè)計與開發(fā)機系統(tǒng)軟件的設(shè)計與開發(fā) 論論文作者姓名:文作者姓名: 申申請請學位學位專業(yè)專業(yè): : 申申請請學位學位類別類別: : 指指導導教教師師姓姓名名( (職職稱稱) ): : 論論文提交日期:文提交日期: 模擬模擬 atm 機系統(tǒng)軟件的設(shè)計與開發(fā)機系統(tǒng)軟件的設(shè)計與開發(fā) 摘摘 要要 二十世紀末,隨著金融服務(wù)的迅速發(fā)展,銀行提款機已經(jīng)發(fā)展成了各大銀 行金融服務(wù)戰(zhàn)略中的重要一環(huán),同時,銀行提款機系統(tǒng)也經(jīng)歷了持續(xù)的更新?lián)Q 代,為廣大用戶提供了更加便捷和人性化的服務(wù)。模擬 atm 系統(tǒng)就是對提款 機操作系統(tǒng)在個人 pc 上及主流操作平臺上的編程實現(xiàn),其開發(fā)主要包括后臺數(shù) 據(jù)庫的建立和維護以及前端應(yīng)用程序的開發(fā)制作兩個方面。對于前者要求建立 起數(shù)據(jù)一致性和完整性強、數(shù)據(jù)安全性好的庫。而對于后者則要求應(yīng)用程序功 能完備,易使用,界面友好等特點。本系統(tǒng)采用 vb6.0,微軟 sqlserver2000, 實現(xiàn)了用戶身份的認證、取款、轉(zhuǎn)帳、交易明細的查詢等功能。分析并解決實 現(xiàn)中遇到的若干問題,例如數(shù)據(jù)庫資料如何實現(xiàn)更新,文本框的文字輸出需要 用到什么技術(shù),如何實現(xiàn)中英文兩種界面,用戶服務(wù)功能如何實現(xiàn)等等。 關(guān)鍵詞關(guān)鍵詞: 模擬 atm 銀行系統(tǒng);ado 控件;vb6.0;sqlserver2000 the design and development of atm simulation system abstract at the end of the 20th century, as the fast development of financial services, atm machines have become the major part of the financial services strategy of every bank, bank teller system has undergone a continuous upgrading, supplied a more efficient and human services for the customers. atm simulation system is the operating system of personal teller machines on the pc platform and the mainstream of programming. the development includes two aspects. the one is establishment and maintenance of background database, the other is development of front-end applications. the former requires establishing a consistency and integrity of strong data security for good. and for the latter demands the application functions are perfect, and easy-to-use and friendly interface, and other features. the atm system describes the structure and function module of the entire layout of the system; the system realized the user authentication, withdrawals, transfers, details of the transaction inquiries, with the visual basic 6.0, microsoft sql server2000; the system analyzed and resolved encountered umpteen issues in the realization, for example, how to realize the database updated, whats the necessary technology is to realize the text areas outputting, how to realize the english and chinese interfaces ingeniously, and how to realize user services functions and so on. key words: atm simulation system ; ado; vb6.0 ;sqlserver2000 目目 錄錄 論文總頁數(shù):26 頁 1引言1 2開發(fā)模擬 atm 系統(tǒng)的目的與意義1 2.1 atm 起源.1 2.2 模擬 atm 系統(tǒng)的意義1 2.2.1現(xiàn)實意義1 2.2.2學習意義2 3模擬 atm 系統(tǒng)開發(fā)平臺簡介2 3.1 windows 下的 visual basic 編程環(huán)境簡介.2 3.1.1面向?qū)ο蟮木幊? 3.1.2visual basic 6.0 特點介紹 .2 3.1.3生成幫助文件及版本信息4 3.2 sqlserver2000 數(shù)據(jù)庫簡介.5 3.2.1數(shù)據(jù)庫的概念5 3.2.2微軟 sqlserver2000 簡介5 3.3 vb6.0 與 sql 數(shù)據(jù)庫二者的連接(ado).5 4系統(tǒng)分析設(shè)計6 4.1 系統(tǒng)功能簡介.6 4.2 系統(tǒng)流程圖7 4.3 系統(tǒng)開發(fā)主要應(yīng)用技術(shù).7 4.3.1系統(tǒng)前臺設(shè)計7 4.3.2后臺數(shù)據(jù)庫設(shè)計8 5系統(tǒng)功能的實現(xiàn)9 5.1 歡迎界面實現(xiàn).9 5.2 登陸的實現(xiàn)9 5.3 主界面實現(xiàn)12 5.4 查詢余額功能的實現(xiàn)13 5.5 取款功能的實現(xiàn).14 5.6 轉(zhuǎn)賬功能的實現(xiàn).16 5.7 密碼修改功能的實現(xiàn)19 5.8 查詢交易明細功能的實現(xiàn).21 5.9 其余界面及函數(shù).21 6系統(tǒng)運行結(jié)果及工作總結(jié).23 6.1 系統(tǒng)測試及運行結(jié)果23 6.2 系統(tǒng)有待改進之處23 6.3 系統(tǒng)中遇到的問題及解決方法23 結(jié) 論.24 參考文獻.24 致 謝.25 聲 明.26 第 1 頁 共 26 頁 1引言引言 隨著時代的進步,社會生產(chǎn)力高速發(fā)展,新技術(shù)層出不窮,信息量急劇膨 脹,整個人類社會已成為金融化信息化的社會,并開始朝著自動化智能化發(fā)展。 以往人們?nèi)ャy行存款取款進行各種財務(wù)處理都必須通過柜臺,隨著越來越多的 人們進入銀行,使用銀行的服務(wù),使銀行出現(xiàn)了工作效率低,顧客等待時間過 長等等問題,既加大了銀行工作人員的工作量,又使得人們享受銀行服務(wù)的質(zhì)量 大幅度降低,所以銀行交易的自動化智能化已經(jīng)成為了一個不可逆轉(zhuǎn)的趨勢,而 且必將成為各個銀行今后發(fā)展的重點。 系統(tǒng)在前臺采用了 visual basic6.0 這一功能全面,方便易學的語言作為開 發(fā)語言,而后臺則用功能強大的 sqlserver2000 數(shù)據(jù)庫加以實現(xiàn)。 2 2開發(fā)模擬開發(fā)模擬 atmatm 系統(tǒng)的目的與意義系統(tǒng)的目的與意義 2.12.1 atmatm 起源起源 現(xiàn)代意義上的 atm 和 pos 系統(tǒng)始于二十世紀 60 年代末。最早的 atm 機 只是現(xiàn)鈔發(fā)放機。1976 年,英格蘭的巴克萊銀行安裝了第一臺現(xiàn)鈔發(fā)放機。它 并沒有使用磁條卡,而是向用戶發(fā)行紙券,用戶將紙券插入機器,取出面值為 10 英鎊的鈔票?,F(xiàn)代 atm 機的想法來自于唐維澤爾。1968 年,當他在達拉斯 銀行排隊等候的時候,萌發(fā)了這個想法。之后,他建議自己的雇主 docutel 研 制這種機器。研發(fā)中最重要的過程是將信息加密后存儲在磁條上,然后將磁條 加在塑料卡片上。研制成功后,doctuel 將 atm 機賣給了紐約化學銀行。1969 年,化學銀行把這個機器安裝在洛克菲勒中心的辦公室。雖然 docutel 的 atm 機器使用了現(xiàn)代的磁條技術(shù),但和今天的技術(shù)相比,還是顯得比較原始。它只 能用于取現(xiàn)鈔,而且只能脫線使用。機器用特殊的方法打印下交易的紀錄。直 到 20 世紀 70 年代初,atm 技術(shù)才發(fā)展到我們今天的水平。起初,atm 主要 用來處理信用卡,到了 1972 年,克里夫蘭城市國家銀行成功地引進了一種可在 atm 機上使用的沒有透支功能的卡片。如今,atm 機發(fā)展了更多功能,包括 存錢、支票和儲蓄賬戶之間相互轉(zhuǎn)賬,付款等等。同時,atm 實現(xiàn)了與計算機 相連接,使客戶可以實時地了解賬戶余額和支付情況。多臺 atm 機與銀行主 機相連,就逐漸形成了 atm 網(wǎng)絡(luò)。 2.22.2 模擬模擬 atmatm 系統(tǒng)的意義系統(tǒng)的意義 2.2.1現(xiàn)實意義現(xiàn)實意義 目前全球共有 atm 超過 120 萬臺,平均每 5 分鐘新增一臺,連南極科考 基地都安裝了 atm,每年通過這些機器進行的金融交易超過 400 億筆。從這些 數(shù)據(jù)可以看出銀行自動提款機已經(jīng)進入了人們的日常生活,我們對自助式服務(wù) 第 2 頁 共 26 頁 已經(jīng)不再陌生,并成為了人們?nèi)粘I盍曇詾槌5囊徊糠?,確實的給人們的生 活帶來了極大的便利。經(jīng)過了近 40 年的發(fā)展,atm 也取得了長足的進步,從 早期的紙券取錢,到現(xiàn)在的一卡在手,atm 機也從早期的簡單機器,后期的系 統(tǒng)集成式機器,發(fā)展成了如今的基于個人 pc 上操作系統(tǒng)下的智能化系統(tǒng),擁 有了更多更全更加方便的功能。隨著個人 pc 的快速發(fā)展,越來越多的 atm 機 逐步替換為了 pc 機,也采用了基于 windows xp 系統(tǒng)下的操作系統(tǒng),具有 了更加人性化,更加友好的操作界面,也具有了更快的響應(yīng)速度,這也使得各 個銀行之間的 atm 操作平臺有了逐步統(tǒng)一的可能,加強各銀行的服務(wù)聯(lián)系, 使客戶跨行進行 atm 交易將更加便捷,資費也能夠得到降低。本次開發(fā)的 atm 系統(tǒng)就是基于 winxp 系統(tǒng)下的具有友好界面的軟件系統(tǒng) 2.2.2學習意義學習意義 開發(fā)一個軟件系統(tǒng),從需求分析到流程圖的繪制及模塊的分析,再到最后 的數(shù)據(jù)庫設(shè)計 及代碼的編寫實現(xiàn)都要自己動手一步一步的來解決完成,這個過 程對于自己在大學所學的知識是一個非常好的檢驗,對動手能力及思維能力也 是一次非常好的鍛煉。希望通過此次的研究學習,認清自己的不足之處,不斷 的去學習完善自己的理論知識,逐步提高動手能力,為以后的工作打下堅實的 基礎(chǔ)。 3模擬模擬 atm 系統(tǒng)開發(fā)平臺簡介系統(tǒng)開發(fā)平臺簡介 3.13.1 windowswindows 下的下的 visualvisual basicbasic 編程環(huán)境簡介編程環(huán)境簡介 3.1.13.1.1 面向?qū)ο蟮木幊堂嫦驅(qū)ο蟮木幊?微軟公司的 visual basic 6.0 是 windows 應(yīng)用程序開發(fā)工具,使目前最為廣 泛的、易學易用的面向?qū)ο蟮拈_發(fā)工具。visual basic 提供了大量的控件,這些 控件可用于設(shè)計界面和實現(xiàn)各種功能,減少了編程人員的工作量,也簡化了界 面設(shè)計過程,從而有效的提高了應(yīng)用程序的運行效率和可靠性。故而,實現(xiàn)本 系統(tǒng) vb 是一個相對較好的選擇。 3.1.23.1.2 visualvisual basicbasic 6.06.0 特點介紹特點介紹 vsual basic6.0 是一種可視化的、面對對象和條用事件驅(qū)動方式的結(jié)構(gòu)化高 級程序設(shè)計,可用于開發(fā) windows 環(huán)境下的種類應(yīng)用程序。它簡單易學、效率 高,且功能強大,可以與 windows 的專業(yè)開發(fā)工具 sdk 相媲美,而且程序開 發(fā)人員不必具有 c/c+編程基礎(chǔ)。在 visual basic 環(huán)境下,利用事件驅(qū)動的編程 機制、新穎易用的可視化設(shè)計工具,使用 windows 內(nèi)部的應(yīng)用程序接口(api)函 數(shù),以及動態(tài)鏈接庫(dll)、動態(tài)數(shù)據(jù)交換(dde)、對象的鏈接與嵌入(ole)、 開放式數(shù)據(jù)訪問(odbc)等技術(shù),可以高效、快速地開發(fā)出 windows 環(huán)境下功 能強大、圖形界面豐富的應(yīng)用軟件系統(tǒng)。總的來說,visual basic 具有以下特點: 第 3 頁 共 26 頁 (1)可視化編程: 用傳統(tǒng)程序設(shè)計語言設(shè)計程序時,都是通過編寫程序代碼來設(shè)計用戶界面, 在設(shè)計過程中看不到界面的實際顯示效果,必須編譯后運行程序才能觀察。如 果對界面的效果不滿意,還要回到程序中修改。有時候,這種編程-編譯-修改 的操作可能要反復多次,大大影響了軟件開發(fā)效率。visual basic 提供了可視化 設(shè)計工具,把 windows 界面設(shè)計的復雜性“封裝”起來,開發(fā)人員不必為界面設(shè) 計而編寫大量程序代碼。只需要按設(shè)計要求的屏幕布局,用系統(tǒng)提供的工具, 在屏幕上畫出各種“部件”,即圖形對象,并設(shè)置這些圖形對象的屬性。visual basic 自動產(chǎn)生界面設(shè)計代碼,程序設(shè)計人員只需要編寫實現(xiàn)程序功能的那部分 代碼,從而可以大大提高程序設(shè)計的效率。 (2)面向?qū)ο蟮某绦蛟O(shè)計 visual basic 應(yīng)用面向?qū)ο蟮某绦蛟O(shè)計方法(oop),把程序和數(shù)據(jù)封裝起來 作為一個對象,并為每個對象賦予應(yīng)有的屬性,使對象成為實在的東西。在設(shè) 計對象時,不必編寫建立和描述每個對象的程序代碼,而是用工具畫在界面上, visual basic 自動生成對象的程序代碼并封裝起來。每個對象以圖形方式顯示在 界面上,都是可視的。 (3)結(jié)構(gòu)化程序設(shè)計語言 visual basic 是在 basic 語言的基礎(chǔ)上發(fā)展起來的,具有高級程序設(shè)計語 言的語句結(jié)構(gòu),接近于自然語言和人類的邏輯思維方式。visual basic 語句簡單 易懂,其編輯器支持彩色代碼,可自動進行語法錯誤檢查,同時具有功能強大 且使用靈活的調(diào)試器和編譯器。 visual basic 是解釋型語言,在輸入代碼的同時,解釋系統(tǒng)將高級語言分解 翻譯成計算機可以識別的機器指令,并判斷每個語句的語法錯誤。在設(shè)計 visual basic 程序的過程中,隨時可以運行程序,而在整個程序設(shè)計好之后,可 以編譯生成可執(zhí)行文件(.exe),脫離 visual basic 環(huán)境,直接在 windows 環(huán)境 下運行。 (4)事件驅(qū)動編程機制 visual basic 通過事件來執(zhí)行對象的操作。一個對象可能會產(chǎn)生多個事件, 每個事件都可以通過一段程序來響應(yīng)。在用 visual basic 設(shè)計大型應(yīng)用軟件時, 不必建立具有明顯開始和結(jié)束的程序,而是編寫若干個微小的子程序,即過程。 這些過程分別面向不同的對象,由用戶操作引發(fā)某個事件來驅(qū)動完成某種特定 的功能,或者由事件驅(qū)動程序調(diào)用通用過程來執(zhí)行指定的操作,這樣可以方便 編程人員,提高效率。 第 4 頁 共 26 頁 (5)訪問數(shù)據(jù)庫 visual basic 具有強大的數(shù)據(jù)庫管理功能,利用數(shù)據(jù)控件和數(shù)據(jù)庫管理窗口, 可以直接建立或處理 microsoft access 格式的數(shù)據(jù)庫,并提供了強大的數(shù)據(jù)存儲 和檢索功能。同時,visual basic 還能直接編輯和訪問其他外部數(shù)據(jù)庫,如 dbase,foxpro,paradox 等,這些數(shù)據(jù)庫格式都可以用 visual basic 編輯和處 理。 visual basic 提供開放式數(shù)據(jù)連接,即 odbc 功能,可通過直接訪問或建立 連接的方式使用并操作后臺大型網(wǎng)絡(luò)數(shù)據(jù)庫,如 sql server,oracle 等。在應(yīng) 用程序中,可以使用結(jié)構(gòu)化查詢語言 sql 數(shù)據(jù)標準,直接訪問服務(wù)器上的數(shù)據(jù) 庫,并提供了簡單的面向?qū)ο蟮膸觳僮髦噶詈投嘤脩魯?shù)據(jù)庫訪問的加鎖機制和 網(wǎng)絡(luò)數(shù)據(jù)庫的 sql 的編程技術(shù),為單機上運行的數(shù)據(jù)庫提供了 sql 網(wǎng)絡(luò)接口, 以便在分布式環(huán)境中快速而有效地實現(xiàn)客戶/服務(wù)器(client/server)方案。 (6)動態(tài)數(shù)據(jù)交換(dde) 利用動態(tài)數(shù)據(jù)交換(dynamic data exchange)技術(shù),可以把一種應(yīng)用程序中 的數(shù)據(jù)動態(tài)地鏈接到另一種應(yīng)用程序中,使兩種完全不同的應(yīng)用程序建立起一 條動態(tài)數(shù)據(jù)鏈路。當原始數(shù)據(jù)變化時,可以自動更新鏈接的數(shù)據(jù)。visual basic 提供了動態(tài)數(shù)據(jù)交換的編程技術(shù),可以在應(yīng)用程序中與其他 windows 應(yīng)用程序 建立動態(tài)數(shù)據(jù)交換,在不同的應(yīng)用程序之間進行通信。 (7)對象的鏈接與嵌入(ole) 對象的鏈接與嵌入(ole)將每個應(yīng)用程序都看做是一個對象(object),將不 同的對象鏈接(link)起來,再嵌入(embed)某個應(yīng)用程序中,從而可以得到具有聲 音、影像、圖像、動畫、文字等各種信息的集合式的文件。ole 技術(shù)是 microsoft 公司對象技術(shù)的戰(zhàn)略,它把多個應(yīng)用程序合為一體,將每個應(yīng)用程序 看做是一個對象進行鏈接和嵌入,是一種應(yīng)用程序一體化的技術(shù)。利用 ole 技 術(shù),可以方便地建立復合式文檔(compound document),這種文檔由來自多個不 同應(yīng)用程序的對象組成,文檔中的每個對象都與原來的應(yīng)用程序相聯(lián)系,并可 執(zhí)行與原來應(yīng)用程序完全相同的操作。 (8)動態(tài)鏈接庫(dll) visual basic 是一種高級程序設(shè)計語言,不具備低級語言的功能,對訪問機 器硬件的操作不太容易實現(xiàn)。但它可以通過動態(tài)鏈接庫技術(shù)將 c/c+或匯編語 言編寫的程序加入到 visual basic 應(yīng)用程序中,可以像調(diào)用內(nèi)部函數(shù)一樣調(diào)用其 他語言編寫的函數(shù)。此外,通過動態(tài)鏈接庫,還可以調(diào)用 windows 應(yīng)用程序接 口(api)函數(shù),實現(xiàn) sdk 所具有的功能。 第 5 頁 共 26 頁 3.1.33.1.3 生成幫助文件及版本信息生成幫助文件及版本信息 專業(yè)水平的軟件通常都帶有聯(lián)機幫助功能。無論寫出來的程序是要給大量 的用戶使用,還是僅僅局限于公司內(nèi)部有限的使用者,我們都應(yīng)該為用戶提供 詳細的、易于理解的聯(lián)機幫助文檔。微軟的 help workshop4.0 是一套獨立于 visual basic 的用來協(xié)助我們創(chuàng)建、運行于 32 位 windows 操作系統(tǒng)下的幫助 文件的工具。使用它我們可以為我們編寫的應(yīng)用程序生成一組幫助文件。為了 是程序顯得更具有專業(yè)風格,首先可以在其中加入通常的應(yīng)用程序信息。這些 信息包括公司名稱、版本號、修訂號以及其他類似信息。visual basic 允許你使 用 app 對象來保存這些信息,app 對象是一個預(yù)定義對象,不需要在程序中創(chuàng) 建它。app 對象的大多數(shù)屬性被應(yīng)用程序用來提供常規(guī)的信息,通過使用這些 app 提供的屬性,可以在應(yīng)用程序和用戶之間交流重要信息,在項目屬性框中 可以設(shè)置它的屬性。 3.23.2 sqlserver2000sqlserver2000 數(shù)據(jù)庫簡介數(shù)據(jù)庫簡介 3.2.13.2.1 數(shù)據(jù)庫的概念數(shù)據(jù)庫的概念 數(shù)據(jù)庫是一種存儲數(shù)據(jù)并對數(shù)據(jù)進行操作的工具。數(shù)據(jù)庫的作用在于組織 和表達信息,簡而言之,數(shù)據(jù)庫就是信息的集合。計算機的數(shù)據(jù)庫可以分為兩 類:非關(guān)系數(shù)據(jù)庫(flat-file)和關(guān)系數(shù)據(jù)庫(relational)。關(guān)系數(shù)據(jù)庫中包含 了多個數(shù)據(jù)表的信息,數(shù)據(jù)庫含有各個不同部分的術(shù)語,象記錄、域等。 3.2.23.2.2 微軟微軟 sqlserver2000sqlserver2000 簡介簡介 sql server 2000 是 microsoft 公司推出的 sql server 數(shù)據(jù)庫管理系統(tǒng)的 最新版本該版本繼承了 sql server 7.0 版本的優(yōu)點同時又比它增加了許多更先 進的功能具有使用方便可伸縮性好與相關(guān)軟件集成程度高等優(yōu)點可跨越從運行 microsoft windows 98 的膝上型電腦到運行 microsoft windows 2000 的大型多 處理器的服務(wù)器等多種平臺使用 ado 是訪問由微軟推出的最新.功能最強,且容易使用的數(shù)據(jù)訪問實例 (oledb)的應(yīng)用程序接口. 我們就是通過它以及創(chuàng)建 active x 數(shù)據(jù)對象 3.33.3 vb6.0vb6.0 與與 sqlsql 數(shù)據(jù)庫二者的連接(數(shù)據(jù)庫二者的連接(adoado) ado recordset 來訪問 sqlsever2000 上的 odbc 數(shù)據(jù)源.使用 ado 控件 可以方便的在 vb6 中訪問 odbc 數(shù)據(jù)庫,但是通過直接放置 adods 控件來獲 得 ado 的數(shù)據(jù)連接比較麻煩,可以在 vb 工程中創(chuàng)建一個公共數(shù)據(jù)模塊,將 ado 控件的初始化、建立連接、關(guān)閉連接等操作都寫到函數(shù)中,這樣就可以在 工程的其他模塊中共享調(diào)用這個 ado 連接。一次完整的 ado 調(diào)用操作分為如 下幾個步驟: (1)打開 ado 到數(shù)據(jù)庫的連接,初始化 ado recordset 集。 第 6 頁 共 26 頁 (2)通過寫入 sql 語句執(zhí)行查詢并返回查詢結(jié)果 recordset 集;或者可 以通過寫入 sql 語句執(zhí)行相應(yīng)數(shù)據(jù)庫操作。 (3)釋放 recordset 集,關(guān)閉數(shù)據(jù)庫連接。需要注意的是,每個動態(tài)創(chuàng)建 的 ado 同時只能被一個過程調(diào)用,如果需要進行多表并行操作,可能需要在 公共數(shù)據(jù)模塊中建立多個動態(tài) ado。在本次設(shè)計中,由于我只設(shè)計了一個主模 塊,所以直接將 ado 控件的初始化、建立連接、關(guān)閉連接等操作都寫到了最先 調(diào)用的身份認證函數(shù)中,就已經(jīng)可以滿足我對數(shù)據(jù)庫的訪問操作. 通過 ado 控件使 visual basic 程序與 sqlserver 數(shù)據(jù)庫之間架起了一座 橋梁,我們可以很方便的通過修改程序中 adodc 的參數(shù),并通過 sql 語句來指 向數(shù)據(jù)庫的不同部分,從而方便的對數(shù)據(jù)庫進行各種操作. 4系統(tǒng)分析設(shè)計系統(tǒng)分析設(shè)計 4.1 系統(tǒng)功能簡介系統(tǒng)功能簡介 經(jīng)過對比真實的銀行提款機系統(tǒng),本系統(tǒng)實現(xiàn)以下內(nèi)容: 1.可以選擇中文和英文兩種語言服務(wù) 2 身份認證 3.密碼修改 4.取款. 5.轉(zhuǎn)帳. 6.查詢余額. 7.查詢交易明細 第 7 頁 共 26 頁 4.2 系統(tǒng)流程圖系統(tǒng)流程圖 登陸 身份驗證 選擇服務(wù) 查詢余額取款 轉(zhuǎn)賬修改密碼查詢明細 退出 圖 1 系統(tǒng)流程圖 4.3 系統(tǒng)開發(fā)主要應(yīng)用技術(shù)系統(tǒng)開發(fā)主要應(yīng)用技術(shù) windows xp 是時下最流行的電腦操作系統(tǒng)穩(wěn)定性安全性都非常不錯, 而隨著 atm 提款機逐步采用個人電腦,以及性能的升級,winxp 也有了可能 成為這些提款機的操作系統(tǒng),所以本次系統(tǒng)也在 winxp 下進行開發(fā)。由于需 要開發(fā)出前臺客戶友好界面及后臺數(shù)據(jù)庫系統(tǒng),而對于前臺只要能滿足其界面 開發(fā)需要即可,所以我采用了相對簡單易用并且功能強大的 vb6.0,后臺數(shù)據(jù) 庫則采用了與之相連方便且功能同樣強大的 sqlserver2000。采用以上兩個 開發(fā)軟件完全能夠滿足 atm 模擬系統(tǒng)的開發(fā)需要。 4.3.14.3.1 系統(tǒng)前臺設(shè)計系統(tǒng)前臺設(shè)計 系統(tǒng)主要是由前臺(客戶操作界面)與后臺(數(shù)據(jù)庫)兩個部分組成。前 臺部分整個代碼程序采用一個主模塊,在里面定義程序全局變量,把各種功能 函數(shù)寫入其中,每個界面制作一個獨立窗體,在各個窗體代碼中來調(diào)用主模塊 中的各個函數(shù)來,來實現(xiàn)相應(yīng)功能。界面部分由于 08 年奧運會的臨近,系統(tǒng)采 用了幾副有關(guān)北京 08 奧運會的卡通圖片,讓界面整體突出一種奧運氣氛。通過 可愛的卡通動物也實現(xiàn)了友好親切的操作氛圍。 第 8 頁 共 26 頁 4.3.24.3.2 后臺數(shù)據(jù)庫設(shè)計后臺數(shù)據(jù)庫設(shè)計 經(jīng)過充分考慮,認為系統(tǒng)并不需要非常復雜的數(shù)據(jù)庫系統(tǒng)就能夠達到模擬 atm 系統(tǒng)的效果,所以建立了一個名為 xqqatm 的 sql 服務(wù)器,創(chuàng)建了名 為 user 的數(shù)據(jù)庫,用戶登陸名為 sa 密碼為空,并在 odbc 數(shù)據(jù)源中將 user 數(shù)據(jù)庫添加進去。其中實際上只運用到兩個表,一個用戶信息表和一個用戶操 作表。 表 1 用戶信息表 用戶信息表(如表 1)用以存放用戶的卡號,密碼,存款金額等信息,由于該 系統(tǒng)是為了模擬運用,故安全要求不高,所以密碼采用了明文方式存放,便于 使用查看。本次模擬系統(tǒng)并不具有創(chuàng)建新用戶的功能,用戶信息表上的內(nèi)容都 是為了模擬而手動添加的樣本用戶。 表 2 用戶操作表 用戶操作表(如表 3)則用來記錄用戶在 atm 機上所使用的服務(wù),它包括了所有 用戶對 atm 的操作信息,包括時間,操作類型,金額,轉(zhuǎn)帳卡號,成功與否 等等。用戶查詢明細的功能就是通過搜集檢索這張表來實現(xiàn)。同時管理人員也 第 9 頁 共 26 頁 可以從這張表上很方便的查閱用戶使用情況。當然,真實的銀行 atm 系統(tǒng), 其后臺的數(shù)據(jù)庫系統(tǒng)肯定是十分龐大的一個系統(tǒng),對保密性的要求也非常的高 ,在這次的模擬中當然不可能達到那樣的要求。 5系統(tǒng)功能的實現(xiàn)系統(tǒng)功能的實現(xiàn) 5.15.1 歡迎界面實現(xiàn)歡迎界面實現(xiàn) 圖 2 歡迎界面 在歡迎界面(如圖 2)我們可以自由的選擇兩種語言,分別為我們最常用的中 文和英語,在這里主模塊中定義了一個非常重要的 int 整型變量 i,通過 i 的值 來決定所選擇的服務(wù)。任意點擊一種服務(wù)都將進入登陸界面。 private sub command1_click() i = 2 當點中文按鈕時,i 的值就被賦為了 2,在后面的操作中,i 的值就 將始終為 2,用以區(qū)別所選語言服務(wù) unload form1 form2.show end sub private sub command2_click() i = 1 點 english 按鈕時 i 的值賦 1 unload form1 form2.show end sub 5.25.2 登陸的實現(xiàn)登陸的實現(xiàn) 在登陸界面有兩種語言可以為用戶服務(wù),一是中文,而是英文。選擇兩種 語言的功能和界面背景實際上都是完全一致的,只是語言文字不同。如圖 3 為 選擇中文的界面: 第 10 頁 共 26 頁 圖 3 登陸界面(中文) 如果點擊的是 english, 則登陸界面為圖 4 圖 4 登陸界面(英文) 這里的兩個界面并非通過兩個窗體單獨實現(xiàn)而是共用一個窗體,通過判斷 i 的值,對 label 中的 caption 進行相應(yīng)的中文和英文賦值。后面的操作界面 同樣也是采用這種方法,就不再做英文的界面介紹。這里把默認的語言選擇為 中文直接在窗體編輯菜單中對 caption 進行了相應(yīng)賦值。如果為英文則需執(zhí)行 下面的語句,此后的每個界面語言確定及實現(xiàn)都是通過采取這個方法 private sub form_load() if i = 1 then /判斷 i 的值 如果為 1 則進行英文賦值 label1.caption = “do you want to continue?please choose!“ command1.caption = “other service“ command2.caption = “cancel“ end if end sub 第 11 頁 共 26 頁 在窗體中我們首先來判斷用戶輸入的卡號和密碼是否符合我們的規(guī)定。卡 號為 8 位密碼為 6 位 private sub command1_click() /當我們點下確認按鈕時 if i = 2 then if len(text1.text) 6 then / 比較 卡號是否為 8 位及密碼是否為 6 位 form3.show form3.label1.caption = “沒有正確輸入卡號或密碼“ text1.text = “ text2.text = “ else call checkuser /這里是調(diào)用主模塊中的身份驗證函數(shù),在后面的 窗體實現(xiàn)中都是通過 call 語句來直接調(diào)用相應(yīng)函數(shù)的 end if end if /以下為用戶選擇英語的代碼,和選擇中文時是一 樣的,在后面的介紹中將不在引用英語的代碼 if i = 1 then if len(text1.text) 6 then form3.show form3.label1.caption = “please input correct cardnumber or password“ text1.text = “ text2.text = “ else call checkuser end if end if end sub 在主模塊 model1 中身份驗證函數(shù)代碼為 public sub checkuser() 定義 checkuser 函數(shù) dim strr as string set con = new adodb.connection strr = “provider=sqloledb.1;password= ;persist security 第 12 頁 共 26 頁 info=true;user id=sa;initial catalog=user;data source=xqqatm“/ 這段 語句采用了動態(tài)連接數(shù)據(jù)庫的方法與數(shù)據(jù)庫 user 進行連接,采用的是 sql oledb 應(yīng)用接口。 con.open strr u = form2.text1.text 把卡號賦給 u str = “select 密碼 from 用戶信息 where 卡號=“ if i pursue you i will not catch you, and if i catch you-through your own slowness and clumsiness-i will not kill you, and if i kill you i will not eat you.“ nicholas had begun to back away, and at the last; words, realizing that they were a signal, he turned and began to run, splashing through the shallow water. ignacio ran after him, much helped by his longer legs, his hair flying behind his dark young face, his square teeth-each white as a bone and as big as nicholass thumbnail-showing like spectators who lined the railings of his lips. “dont run, nicholas,“ dr. island said with the voice of a wave. “it only makes him angry that you run.“ nicholas did not answer, but cut to his left, up the beach and among the trunks of the palms, sprinting all the way because he had no way of knowing ignacio was not right behind him, about to grab him by the neck. when he stopped it was in the thick jungle, among the boles of the hardwoods, where he leaned,.; out of breath, the thumping of his own heart the only . sound in an atmosphere silent and unwaked as earths long, prehuman day. for a time he listened for any sound ignacio might make searching for him; there was none. he drew a deep breath then and said, “well, thats over,“ expecting dr. island to answer from somewhere; there was only the green hush. the light was still bright and strong and nearly, shadowless, but some interior sense told him the day, was nearly over, and he noticed that such faint shades as he could see stretched long, horizontal distortions of their objects. he felt no hunger, but he had fasted be- fore and knew on which side of hunger he stood; he was not as strong as he had been only a day past, and by this time next day he would probably be unable to outrun ignacio. he should, he now realized, have eaten the monkey he had killed; but his stomach revolted at the thought of the raw flesh, and he did not know how he might build a fire, although ignacio seemed to have done so the night before. raw fish, even if he were able to catch a fish, would be as bad, or worse, than raw monkey; he remembered his effort to open a coconut-he had failed, but it was surely not impossible. his mind was hazy as to what a coconut might contain, but there had to be an edible core, because they were eaten in books. he decided to make a wide sweep through the jungle that would bring him back to the beach well away from ignacio; he had several times seen coconuts lying in the sand under the trees. he moved quietly, still a little afraid, trying to think of ways to open the coconut when he found it. he imagined himself standing before a large and raggedly faceted stone, holding the coconut in both hands. he raised it and smashed it down, but when it struck it was no longer a coconut but mayas head; he heard her nose cartilage break with a distinct, rubbery snap. her eyes, as blue as the sky above madhya pradesh, the sparkling blue sky of the egg, looked up at him, but he could no longer look into them, they retreated from his own, and it came to him quite suddenly that lucifer, in falling, must have fallen up, into the fires and the coldness of space, never again to see the warm blues and browns and greens of earth: 1 was watching satan fall as lightning from heaven. he had heard that on tape somewhere, but he could not remember where. he had read that on earth lightning did not come down from the clouds, but leaped up from the planetary surface toward them, never to return. “nicholas.“ he listened, but did not hear his name again. faintly water was babbling; had dr. island used that sound to speak to him? he walked toward it and found a little rill that threaded a way among the trees, and followed it. in a hundred steps it grew broader, slowed, and ended in a long blind pool under a dome of leaves. . diane was sitting on moss on the side opposite him; she looked up as she saw him, and smiled. “hello,“ he said. “hello, nicholas. i thought i heard you. i wasnt mistaken after all, was i?“ “i didnt think i said anything.“ he tested the dark water with his foot and found that it was very cold. 第 28 頁 共 26 頁 “you gave a little gasp, i fancy. i heard it, and i said to myself, thats nicholas, and i called you. then i thought i might be wrong, or that it might be ignacio.“ “ignacio was chasing me. maybe he still is, but h think hes probably given up by now.“ the girl nodded, looking into the dark waters of they pool, but did not seem to have heard him. he began to work his way around to her, climbing across the snakelike roots of the crowding trees. “why does ignacio want to kill me, diane?“ “sometimes he wants to kill me, too,“ the girl said. “but why?“ “i think hes a bit frightened of us. have you ever talked to him, nicholas?“ “today i did a little. he told me a story about a pet fish he used to have.“ “ignacio grew up all alone; did he tell you that? on= earth. on a plantation in brazil, way up the amazon -dr. island told me.“ “i thought it was crowded on earth.“ “the cities are crowded, and the countryside closes to the cities. but there are places where its emptie than it used to be. where ignacio was, there would have been red indian hunters two or three hundred years ago; when he was there, there wasnt anyone, just the machines. now he doesnt want to be looked at, doesnt want anyone around him.“ nicholas said slowly, “dr. island said lots of people wouldnt be sick if only there werent other people around all the time. remember that?“ a “only there. are other people around all the time; thats how the world is.“ “not in brazil, maybe,“ nicholas said. he was trying to remember something about brazil, but the only thing he could think of was a parrot singing in a straw hat from the comview cartoons; and then a turtle and a hedgehog that turned into a
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 《內(nèi)戰(zhàn)的爆發(fā)》人民解放戰(zhàn)爭的勝利課件-1
- 2025屆江西省浮梁一中高三摸底考試數(shù)學試題
- 《二泉映月》音樂課件
- 機械制造工藝??荚囶}(含參考答案)
- 老年股骨頸骨折術(shù)前術(shù)后護理
- 事業(yè)單位環(huán)保培訓
- 2025年昌吉貨運資格證模擬考試新題庫
- 2025個體商戶的買賣合同協(xié)議
- 保潔衛(wèi)生協(xié)議書
- 合作協(xié)議 上市
- 2025福建省泉州市房屋租賃合同范本
- 中華遺產(chǎn)考試題目及答案
- 全廠設(shè)施色彩、標志牌統(tǒng)一規(guī)定
- 《民航重大安全隱患判定標準(2024 年修訂版)》知識培訓
- 大班語言《他們看見了一只貓》課件
- 教育游戲化策略研究-全面剖析
- 物業(yè)電工安全培訓
- 湖南省炎德英才名校聯(lián)考聯(lián)合體2024-2025學年高二下學期3月月考-化學+答案
- 昆明市官渡區(qū)衛(wèi)生健康局招聘筆試真題2024
- 吉林省吉林市2024-2025學年高三下學期3月三模試題 歷史 含答案
- 2024年昆明市官渡區(qū)衛(wèi)生健康局招聘考試真題
評論
0/150
提交評論