freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

本科畢業(yè)設(shè)計(jì)論文_基于java的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)-資料下載頁(yè)

2024-08-27 10:57本頁(yè)面

【導(dǎo)讀】于此同時(shí),賬戶管理是銀行業(yè)務(wù)流程過(guò)程中十分重要且必備。行賬戶的高效管理就越顯重要。設(shè)計(jì)、程序編碼、軟件測(cè)試等過(guò)程進(jìn)行規(guī)范設(shè)計(jì)。出相關(guān)錯(cuò)誤提示,以便于用戶及時(shí)地更正。設(shè)計(jì)過(guò)程思路清晰,模塊劃分。簡(jiǎn)潔,設(shè)計(jì)各階段分工明確,極大的提高了本系統(tǒng)的實(shí)現(xiàn)。

  

【正文】 學(xué)校的老師和親愛(ài)的同學(xué)表示深深的謝意! 作者: *** 年 月 號(hào) 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 28 附 錄 附錄 A 源程序主要代碼 /** * 定義一個(gè)實(shí)現(xiàn)類(lèi)實(shí)現(xiàn)接口中的所有方法,并且通過(guò)訪問(wèn)數(shù)據(jù)庫(kù)更新賬戶 */ public class AccountDaoImp extends Base implements AccountDao { private Account acc。 private Connection conn。 private PreparedStatement ps。 private ResultSet rs。 public AccountDaoImp() { conn = getConnection()。 } // 注冊(cè)用戶 public Account addAccount(Account a) { String sql = insert into allaccount(password,name,personid,,balance) values(?,?,?,?,?)。 try { ps = (sql)。 (1, ())。 (2, ())。 (3, ())。 (4, ())。 (5, ())。 int status = ()。 if (status == 1) { return a。 } } catch (SQLException e) { ()。 } 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 29 return null。 } // 根據(jù) id 查找用戶 public Account findAccountById(long id) { acc=null。 String sql = select * from allaccount where id= ?。 try { ps = (sql)。 (1, id)。 rs = ()。 while (()) { int db_id = (id)。 String db_password = (password)。 String db_name = (name)。 String db_personid = (personid)。 String db_ = ()。 double db_balance = (balance)。 acc = new Account(db_password, db_name, db_personid, db_, db_balance)。 (db_id)。 } } catch (Exception e) { } return acc。 } // 用戶登錄 public Account login(String name, String password) { acc=null。 String sql = select * from allaccount where name = ? and password = ?。 try { ps = (sql)。 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 30 (1, name)。 (2, password)。 rs = ()。 while (()) { int db_id = (id)。 String db_password = (password)。 String db_name = (name)。 String db_personid = (personid)。 String db_ = ()。 double db_balance = (balance)。 acc = new Account(db_password, db_name, db_personid, db_, db_balance)。 (db_id)。 } } catch (Exception e) { ()。 } return acc。 } // 更新用戶數(shù)據(jù) public Account updateAccount(Account a) { String sql = update allaccount set password = ?,name = ?,personid = ?, = ?,balance = ? where id = ?。 try { ps = (sql)。 (1, ())。 (2, ())。 (3, ())。 (4, ())。 (5, ())。 (6, ())。 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 31 int status = ()。 if (status == 1) { return a。 } } catch (SQLException e) { ()。 } return null。 } } +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /** * 為用戶編寫(xiě)其他相關(guān) 類(lèi),在該類(lèi)中有用戶注冊(cè) 、存款、取款等方法, 用 戶會(huì)通 * 過(guò)調(diào) 用 BankDB中的方法來(lái)操作自己的賬戶。 */ public class BankDB { private AccountDaoImp adi = null。 private Account acc = null。 // 臨時(shí)定義一個(gè) account 對(duì)象 private double balance。 private static BankDB b = new BankDB()。 // 定義一個(gè)類(lèi)的私有的對(duì)象并實(shí)例化 // 將 bank 的無(wú)參數(shù)的構(gòu)造器私有化 private BankDB() { adi = new AccountDaoImp()。 } // 提供一個(gè)類(lèi)的公開(kāi)的外間獲取本類(lèi)的對(duì)象的方法 public static BankDB getInstance() { return b。 } // 用戶開(kāi)戶(注冊(cè)),返回新創(chuàng)建的 Account 對(duì)象 public Account register(String password, String ensurepassword, String name, String personid, String ) { 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 32 if ( (^[\u4e00\u9fa5]+$) amp。amp。 (^[19][09]{6}[09X]$) amp。amp。 (^[09]{5}[09]$) amp。amp。 (ensurepassword) amp。amp。 (\\w+@\\w+\\.\\w+)||()) { acc = new Account(password, name, personid, , )。 (null, 恭喜您注冊(cè)成 功! )。 acc = (acc)。 return acc。 } else { return null。 } } // 用戶登錄,返回 Account 對(duì)象 public Account login(String username, String password) { acc = (username, password)。 return acc。 } // 用戶存款 (deposit),返回修改過(guò)的 Account 對(duì)象 public double deposit(Account acc, double cash) { (() + cash)。 (acc)。 return balance。 } // 用戶轉(zhuǎn)賬; public String Transfer(Account acc, long transfer_id, double cash) { Account transfer = findAccountById(transfer_id)。 if (transfer != null) { if(().equals(())){ return 不能對(duì)自己轉(zhuǎn)賬! 。 } 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 33 else if (() = cash) { (() + cash)。 // 更新轉(zhuǎn)入賬戶 (transfer)。 (() cash)。 // 更新轉(zhuǎn)出賬戶 (acc)。 return 轉(zhuǎn)賬成功 。 } else { return 您的余額不足! 。 } }else { return 轉(zhuǎn)入賬戶不存在 。 } } // 用戶取款 (withdraw),返回修改過(guò)的 Account 對(duì)象 public Account withDraw(Account acc, double cash) { double money = ()。 if (money = cash) { (money cash)。 (acc)。 (null, 您已成功取款: + cash + 元 )。 } else { (null, 余額不足 )。 } return null。 } // 根據(jù)用戶 id 查找用戶; public Account findAccountById(long id) { acc = (id)。 return acc。 } +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 34 /** * 注冊(cè)界面。用戶填寫(xiě) 注冊(cè)信息 后,通過(guò) BankDB中的 register方法對(duì)這些信息校驗(yàn) * 驗(yàn),待校驗(yàn)通過(guò)后, 再用 AccountDaoImp中的 addAccount 方法在數(shù)據(jù)庫(kù)中進(jìn)行 * 添加新用戶 的注 冊(cè)信息,成功后跳轉(zhuǎn)到登錄界面,供用戶登錄。 */ public class UserRegisterPanel extends { private CardLayout layout。 public UserRegisterPanel() { initComponents()。 } public UserRegisterPanel(CardLayout c) { layout = c。 initComponents()。 } private void jButtonActionPerformed( evt) { if (() == jButton3) { ()。 ()。 ()。 ()。 ()。 (().getContentPane(),user_login)。 } else if (() == jButton1) { String reg_name = ().replace( , ).trim()。 String reg_pass = new String(().replace( ,)).trim()。 String reg_enpass = new String(().replace( , )).trim()。 String reg_personid = ().replace( , ).trim()。 String reg_ = ().replace( , ).trim()。 BankDB b = ()。 基于 JAVA 的銀行賬戶管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 35 if ((reg_pass, reg_enpass, reg_name, reg_personid, reg_) != null) { (().getContentPane(), user_login)。 } else { (null, 注冊(cè)失??! )。 } ()。 ()。 ()。 ()。 ()。 (false)。 } else if (() == jButton2) { ()。 ()。 ()。 ()。 ()。 (false)。 } } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1