java应用程序综合实践报告格式任务书.docx
- 文档编号:5505913
- 上传时间:2022-12-17
- 格式:DOCX
- 页数:14
- 大小:271.87KB
java应用程序综合实践报告格式任务书.docx
《java应用程序综合实践报告格式任务书.docx》由会员分享,可在线阅读,更多相关《java应用程序综合实践报告格式任务书.docx(14页珍藏版)》请在冰豆网上搜索。
java应用程序综合实践报告格式任务书
《应用程序综合实践》课程设计
——简单的学生管理系统
指导教师:
刘雁飞、桂江生
班级:
09数媒
(1)班
学号:
E09700107
姓名:
张竞宇
课程设计报告
一、实验目的
1、提高分析问题、解决问题的能力,进一步巩固应用程序设计中的基本原理与方法。
2、熟悉掌握一门计算机语言,可以进行一般应用程序的开发设计。
二、实验原理
“学生信息管理系统”学生模块是由网络和网页实现的。
所以本系统使用JSP开发技术,应用界面友好且功能强大的由MXMyECplise软件,服务器端脚本用JAVA脚本来编写,客户端脚本也用JAVA来编写,数据库使用MySQL数据库,服务器是TOMCAT。
三、实验步骤
图1学生系统流程图
图2学生管理系统
图3学生信息
四、实验结果
五、实验心得
经过本次的课程设计,不仅让我更加熟练的掌握了JAVA的应用,也让我学习到了有关JSP的知识和MyECplise、Tomcat、MySQL的知识,使我了解脚本语言对JSP的重要。
在这次设计过程中,培养了我的自学能力,在遇到技术困难的时候,能够认真的对待,永不放弃,无论是查看各种书籍还是到图书馆中查找各种资料,想尽一切办法将这个问题解决。
这将在以后的学习生活中有很大的帮
六、主要代码
xmlversion="1.0"encoding="UTF-8"?
>
xmlns="http: //www.springframework.org/schema/beans" xmlns: xsi="http: //www.w3.org/2001/XMLSchema-instance"xmlns: aop="http: //www.springframework.org/schema/aop" xmlns: tx="http: //www.springframework.org/schema/tx" xsi: schemaLocation="http: //www.springframework.org/schema/beans http: //www.springframework.org/schema/beans/spring-beans-2.5.xsd"> http: //www.springframework.org/schema/tx http: //www.springframework.org/schema/tx/spring-tx.xsd"> http: //www.springframework.org/schema/aop http: //www.springframework.org/schema/aop/spring-aop.xsd"> value="jdbc: mysql: //localhost: 3306/testDB? useUnicode=true&characterEncoding=utf8"> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
Classdao:
packagecn.edu.zstu.dao;
importjava.util.List;
importcn.edu.zstu.model.Student;
publicinterfacestuMgrDAO{
publicvoidadd(Students);
publicStudentgetStudent(Integerid);
publicList
publicvoidupdate(Students);
publicvoiddelete(Integerid);
}
packagecn.edu.zstu.dao.impl;
importjava.util.List;
importorg.springframework.orm.hibernate3.support.HibernateDaoSupport;
importcn.edu.zstu.dao.StudentDAO;
importcn.edu.zstu.model.Student;
publicclassStudentDAOImplextendsHibernateDaoSuportimplementsStudentDAO{
publicvoidadd(Students){
getHibernateTemplate().save(s);
}
publicvoiddelete(Integerid){
getHibernateTemplate().delete(getStudent(id));
}
publicStudentgetStudent(Integerid){
return(Student)getHibernateTemplate().get(Student.class,id);
}
@SuppressWarnings("unchecked")
publicList
returngetHibernateTemplate().find("fromStudentorderbyiddesc");
}
publicvoidupdate(Students){
getHibernateTemplate().update(s);
}
}
packagecn.edu.zstu.service:
packagecn.edu.zstu.service;
importjava.util.List;
importcn.edu.zstu.model.Student;
publicinterfaceStudentService{
publicvoidaddStudent(Students);
publicStudentgetStudent(Integerid);
publicList
publicvoidupdateStudent(Students);
publicvoiddeleteStudent(Integerid);
}
classStudentServiceImplimplementsStudentService:
packagecn.edu.zstu.service.Impl;
importjava.util.List;
importcn.edu.zstu.dao.StudentDAO;
importcn.edu.zstu.model.Student;
importcn.edu.zstu.service.StudentService;
publicclassStudentServiceImplimplementsStudentService{
privateStudentDAOstudentDao;
publicvoidaddStudent(Students){
studentDao.add(s);
}
publicvoiddeleteStudent(Integerid){
studentDao.delete(id);
}
publicStudentgetStudent(Integerid){
returnstudentDao.getStudent(id);
}
publicList
returnstudentDao.getStudents();
}
publicvoidupdateStudent(Students){
studentDao.update(s);
}
publicStudentDAOgetStudentDao(){
returnstudentDao;
}
publicvoidsetStudentDao(StudentDAOstudentDao){
this.studentDao=studentDao;
}
}
packagecn.edu.zstu.action;
importjava.util.List;
importcn.edu.zstu.model.Student;
importcn.edu.zstu.service.StudentService;
importcom.opensymphony.xwork2.ActionSupport;
publicclassStudentActionextendsActionSupport{
privatestaticfianllongserialVersionUID=1L;
privateStudentServicestudentService;
privateStudentstudent;
privateList
privateIntegerid;
publicStudentgetStudent(){
returnstudent;
}
publicvoidsetStudent(Studentstudent){
this.student=student;
}
publicIntegergetId(){
returnid;
}
publicvoidsetId(Integerid){
this.id=id;
}
publicList
returnstudents;
}
publicvoidsetStudentService(StudentServicestudentService){
this.studentService=studentService;
}
publicStringadd(){
studentService.addStudent(student);
returnSUCCESS;
}
publicStringlist(){
this.students=studentService.getStudents();
returnSUCCESS;
}
publicStringdelete(){
studentService.deleteStudent(id);
returnSUCCESS;
}
publicStringupdate(){
studentService.updateStudent(student);
returnSUCCESS;
}
publicStringgetById(){
student=studentService.getStudent(id);
returnSUCCESS;
}
}
DOCTYPEstrutsPUBLIC
"-//ApacheSoftwareFoundation//DTDStrutsConfiguration2.0//EN"
"http:
//struts.apache.org/dtds/struts-2.0.dtd">
add.jsp
<%@pagelanguage="java"import="java.util.*"pageEncoding="GB18030"%>
<%@tagliburi="/struts-tags"prefix="s"%>
textname="新增学生">
text>
formaction="add"method="post"> textfieldlabel="姓名"name="student.name"/> textfieldlabel="性别"name="student.gender"/> textfieldlabel="年龄"name="student.age"/> submit> submit> form>
list.jsp
<%@pagelanguage="java"pageEncoding="GB18030"%>
<%@tagliburi="/struts-tags"prefix="s"%>
DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN">
输出列表信息
学生注册
formaction="delete"theme="simple"> iteratorvalue="students"> value=' propertyvalue="id"/>'/> propertyvalue="id"/> propertyvalue="name"/> propertyvalue="gender"/> propertyvalue="age"/> urlactionn="get"> paramname="id"value="id"/ url>'>修改 urlactionn="delete"> paramname="id"value="id"/ url>'>删除 iterator>选择 编号 姓名 性别 年龄 操作
form>
update.jsp
<%@pagelanguage="javapageEncoding="GB18030"%>
<&@tagliburi="/struts-tags"prefix="s"%>
DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN">
修改信息
formaction="update.action"> hiddenname="student.id"/> textfieldlabel="性别"name="student.gender"/> textfieldlabel="年龄"name="student.age"/> submitvalue="修改"> submit> form>
>
>
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- java 应用程序 综合 实践 报告 格式 任务书