兰州工业高等专科学校毕业论文
public void setAge(int age) { this.age = age;
}
}
public class SCard { private String cano; //储户卡号 private int id;
private double money; //储户卡额 private String name; //储户名 private String address; private String cuno; private String sex; private String tel; private String time; private int age;
public String getCano() { return cano;
}
public void setCano(String cano) { this.cano = cano;
}
public int getId() { return id;
}
public void setId(int id) { this.id = id;
}
public double getMoney() {
return money;
23
兰州工业高等专科学校毕业论文
}
public void setMoney(double money) { }
public String getName() { }
public void setName(String name) { }
public String getAddress() { }
public void setAddress(String address) { }
public String getCuno() { }
public void setCuno(String cuno) { }
public String getSex() { }
public void setSex(String sex) { }
public String getTel() {
return tel;
24
this.money = money;
return name;
this.name = name;
return address;
this.address = address;
return cuno;
this.cuno = cuno;
return sex;
this.sex = sex;
兰州工业高等专科学校毕业论文
}
}
public void setTel(String tel) { }
public String getTime() { }
public void setTime(String time) { }
public int getAge() { }
public void setAge(int age) { }
this.age = age; return age; this.time = time; return time; this.tel = tel;
//开户
public void insertCustomer(Customer c){ //获取连接
ConnectionTool cc = new ConnectionTool(); Connection con = cc.getConnection(); //创建会话 //Statement st = null; PreparedStatement st = null; try {
//st = con.createStatement();
//String sql = \//
25
兰州工业高等专科学校毕业论文
\
c.getTime()+\
String
sql
=
\
into
t_customer(customer_name,customer_address,customer_no,customer_sex,customer_tel,create_time,customer_age) values(?,?,?,?,?,?,?)\
}
st = con.prepareStatement(sql); //st.setInt(1, c.getId()); st.setString(1, c.getName()); st.setString(2, c.getAddress()); st.setString(3, c.getNo()); st.setString(4, c.getSex()); st.setString(5, c.getTel()); st.setString(6, c.getTime()); st.setInt(7, c.getAge()); System.out.println(\st.executeUpdate(); //st.executeUpdate(sql);
} catch (SQLException e) { }
// TODO Auto-generated catch block e.printStackTrace();
26
兰州工业高等专科学校毕业论文
总 结
本次毕业设计的题目是个人银行储蓄系统,是根据现有的银行系统设计的一个银行系统模型。
本次毕业设计基本要求是通过三层架构模型来完成基本的系统设计,区分层次的目的即是为了达到“高内聚,低耦合”的思想。该系统一共有四张表,客户表,银行卡表,柜员表和流水记录表,其中在三层架构mvc中有将细分出DAO层,用于数据库的操作处理,并且数据库连接通过连接池进行连接,以提高系统的性能,连接数据库又通过读写配置文件形式进行加载驱动和获取与数据库的连接。
这样设计目的主要是为了提高系统的性能,便于系统的维护和数据库的更改,同时也减少了数据库获取连接的次数,减少系统资源的开销,避免的每次操作数据库都需要连接的弊端。
在知道了应该划分的层次后就进行数据库的设计,设计完数据库后就进行对界面的设计,我们对于界面的设计并不需要非常漂亮,因为我们主要是为了完成系统的功能。对于一个银行系统,最基本的功能就是要取款和存款功能,在此基础上还要查询功能、挂失解挂功能等,功能越多系统就会越健壮。而且完成这些功能并不是一件容易的事。我们所选的编程软件是MyEclipse8.6,编程语言是jsp+java+javascript。其中没有javascript的应用基础,还需边学边用。而且jsp和java的动手能力又很差,所以,这次毕业设计要顺利完成也不是一件容易的事。
在整个系统设计的过程中,我们也遇到了很多的困难。在老师的带领下我们先是看系统详细说明,了解系统需求,然后再根据自己的理解去做系统需求分析,概要设计,设计完后则进入详细编码阶段。
27