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

正文內(nèi)容

基于java的虛擬股票交易系統(tǒng)的研究與實(shí)現(xiàn)(編輯修改稿)

2025-07-20 22:30 本頁面
 

【文章內(nèi)容簡介】 DataBase {private static Connection con=null。 public static Connection getConnection()throws Exception{ if(con==null){ ()。 con=(jdbc:mysql://localhost:3306/zhanghao, root, 123)。 } return con。 }}對(duì)于數(shù)據(jù)庫中管理員,用戶,交易,股票表的操作。(由于此操作過多,只選擇CustomerDao進(jìn)行展示)package 。import 。import 。import 。import 。import 。public class CustomerDao { //登陸驗(yàn)證ssn ,pw public static boolean CusLogin(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(select * from customer where cssn=? and pw=?)。 (1, ())。 (2, ())。 ResultSet rs=()。 boolean flag=()。 ()。 ()。 ps=null。 return flag。 } //添加新用戶 public static void addCus(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(insert into customer(ame,cssn,address,pw,money,tele) values(?,?,?,?,?,?))。 (1, ())。 (2, ())。 (3, ())。 (4, ())。 (5, ())。 (6, ())。 ()。 ()。 ps=null。 } //返回對(duì)象為Customer,得到用戶姓名 public static Customer getName(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(select * from customer where cssn=? and pw=?)。 (1, ())。 (2, ())。 ResultSet rs=()。 Customer customer=null。 while(()){ customer=new Customer((id),(ame),(money))。 } ()。 ()。 ps=null。 return customer。 } //查看所有用戶信息 public static VectorCustomer getCust()throws Exception{ PreparedStatement ps=().prepareStatement(select * from customer)。 ResultSet rs=()。 VectorCustomer v=new VectorCustomer()。 Customer c1=null。 while(()){ c1=new Customer()。 ((id))。 ((ame))。 ((address))。 ((cssn))。 ((pw))。 ((money))。 ((tele))。 (c1)。 } ()。 ()。 ps=null。 return v。 } //首頁查詢賬戶余額的方法 public static VectorCustomer getBuy(int a)throws Exception{ PreparedStatement ps=().prepareStatement(select money from customer where id=?)。 (1, a)。 ResultSet rs=()。 VectorCustomer v=new VectorCustomer()。 while(()){ Customer c=new Customer()。 ((money))。 (c)。 } ()。 ()。 ps=null。 return v。 } //查找指定用戶手中的賬戶余額 //先得到用戶對(duì)象 //買賣股票操作時(shí),后臺(tái)調(diào)用得到賬戶余額的方法 public static Customer getBuy1(int a)throws Exception{ PreparedStatement ps=().prepareStatement(select money from customer where id=?)。 (1, a)。 ResultSet rs=()。 Customer c=null。 while(()){ c=new Customer((money))。 } ()。 ()。 ps=null。 return c。 } //賬戶余額的變化 public static void getSellMoney(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(update customer set money=money+? where id=? )。 (1, ())。 (2, ())。 ()。 ()。 ps=null。 } //當(dāng)用戶購買股票時(shí),賬戶余額發(fā)生變化 public static void getBuyMoney(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(update customer set money=money? where id=? )。 (1, ())。 (2, ())。 ()。 ()。 ps=null。 } //得到指定用戶的個(gè)人信息 public static VectorCustomer getCus(int a)throws Exception{ PreparedStatement ps=().prepareStatement(select * from customer where id=?)。 (1, a)。 ResultSet rs=()。 VectorCustomer v=new VectorCustomer()。 while(()){ Customer c=new Customer()。 ((id))。 ((ame))。 ((address))。 ((cssn))。 ((tele))。 ((pw))。 (c)。 } ()。 ()。 ps=null。 return v。 } //修改指定用戶的個(gè)人信息 public static void updateCus(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(update customer set address=?,tele=? where id=?)。 (1, ())。 (2, ())。 (3, ())。 ()。 ()。 ps=null。 } //刪除指定用戶 public static void delCus(int a)throws Exception{ PreparedStatement ps=().prepareStatement(delete from customer where id=? )。 (1, a)。 ()。 ()。 ps=null。 } //登陸注冊(cè)ssn是否存在 public static boolean ifSsn(String s)throws Exception{ PreparedStatement ps=().prepareStatement(select * from customer where cssn=?)。 (1, s)。 ResultSet rs=()。 boolean flag=()。 ()。 ()。 ps=null。 return flag。 } //用戶修改自己的個(gè)人信息 public static void updateCus1(Customer c)throws Exception{ PreparedStatement ps=().prepareStatement(update customer set ame=?,pw=?, address=?,
點(diǎn)擊復(fù)制文檔內(nèi)容
外語相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1