欢迎来到天天文库
浏览记录
ID:25355742
大小:271.51 KB
页数:25页
时间:2018-11-19
《java简单图书馆管理.doc》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、内蒙古工业大学信息工程学院设计一个通用的基于浏览器/服务器的简单图书馆管理系统,实现用户的注册和登陆,以及图书的查询与借阅。1、实验要求1)利用JavaBean进行数据传递2)用户的基本信息采用数据库存放3)使用Sevlet进行数据验证八、程序清单Admin类//管理员packagelibrary.info;publicclassAdmin{privateStringusername;privateStringuserkey;publicAdmin(){username=null;userkey=null;}publicAdmin(Stringusername,Strin
2、guserkey){this.username=username;this.userkey=userkey;}publicvoidsetUsername(Stringusername){this.username=username;}publicStringgetUsername(){returnusername;}publicvoidsetUserkey(Stringuserkey){this.userkey=userkey;}publicStringgetUserkey(){returnuserkey;第页内蒙古工业大学信息工程学院}publicbooleanequa
3、ls(Objecta){if(a==null)returnfalse;if(!(ainstanceofAdmin))returnfalse;Admintemp=(Admin)a;if((username.equals(temp.username))&&(userkey.equals(temp.userkey)))returntrue;elsereturnfalse;}}Book类//图书packagelibrary.info;publicclassBook{privateStringnumber;privateStringname;privateStringauthor;
4、privateStringchubanshe;privateStringjiage;privateStringshuliang;publicBook(){number=null;name=null;author=null;chubanshe=null;jiage=null;shuliang=null;}publicBook(Stringnumber,Stringname,Stringauthor,Stringchubanshe,Stringjiage,Stringshuliang){this.number=number;this.name=name;this.author
5、=author;this.chubanshe=chubanshe;this.jiage=jiage;this.shuliang=shuliang;}publicvoidsetNumber(Stringnumber){this.number=number;}第页内蒙古工业大学信息工程学院publicStringgetNumber(){returnnumber;}publicvoidsetName(Stringname){this.name=name;}publicStringgetName(){returnname;}publicvoidsetAuthor(Stringau
6、thor){this.author=author;}publicStringgetAuthor(){returnauthor;}publicvoidsetChubanshe(Stringchubanshe){this.chubanshe=chubanshe;}publicStringgetChubanshe(){returnchubanshe;}publicvoidsetJiage(Stringjiage){this.jiage=jiage;}publicStringgetJiage(){returnjiage;}publicvoidsetShuliang(Strings
7、huliang){this.shuliang=shuliang;}publicStringgetShuliang(){returnshuliang;}}userlogin.jsp//登陆界面第页内蒙古工业大学信息工程学院<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%>
此文档下载收益归作者所有