java编写图书馆管理系统内容摘要:
+s8+; )。 int n1=(this, 是否确定添加 ” )。 if(n1==){ /*。 */ String personInfo=/* 学号: +*/s2+\r\n+/* 姓名: +*/s1+\r\n+/* 年龄:+*/s3+\r\n/*+性别: */+s4+\r\n/*+学院: */+s5+\r\n/*+专业: */+s6+\r\n+/*年级:+*/s7+\r\n/*+班级: */+s8+\r\n。 /*用户所有信息 */ byte tom1[]=new byte[1000000]。 tom1=()。 try{ File f=new File(C:\\)。 try { ()。 // 当且仅当不存在具有此抽象路径名指定名称的文件时,不可分地创建一个新的空文件 } catch (IOException e2) { ()。 } FileOutputStream out=new FileOutputStream(f,true)。 /*(tom)。 */ (tom1,0,)。 /*while((b=(tom,0,10000))!=1){ String s=new String(tom,0,b)。 */ (personInfo)。 /*}*/ ()。 /*弹出添加成功的界面 */ (this, 添加成功 !, 通 知 对 话 框,)。 (null)。 (null)。 (null)。 (null)。 (null)。 (null)。 (null)。 (null)。 } catch (IOException ex){ (this, 文件写入错误。 , 警告对话框,)。 /*(File write Error+ex)。 */ } } } } catch(Exception ee){ (this, 学 号 或 年 龄格 式 错 误。 , 警告 对 话框,)。 (null)。 (null)。 ()。 } } /////////////////// } } } import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 import。 public class AddInforFrame extends JFrame implements ActionListener{ static int inforcount=0。 JLabel alable。 /*姓名、学号、年龄、性别、学院、专业、年级、班级 */ JLabel userlable。 JLabel usernumber。 JLabel age。 JLabel sex。 JLabel collage。 JLabel major。 JTextField userinput,usernuminput,ageinput,sexinput,collageinput,majorinput。 JTextArea showtext。 /*用于显示用户添加的信息域 */ JButton ok。 JButton reset。 int flag=0。 int flag1=0。 public AddInforFrame(){ init()。 setBounds(400,100,600,600)。 setVisible(true)。 setResizable(false)。 /* addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ int n=( this, 是否要真的退出添加。 ,确认对话框 , )。 if(n==){。 (0)。 } } })。 */ setDefaultCloseOperation()。 } void init(){ alable =new JLabel(请填写相关信息: )。 userlable=new JLabel(学号: )。 usernumber =new JLabel(编号: )。 age=new JLabel(姓名: )。 sex=new JLabel(书名: )。 collage=new JLabel(借书时间: )。 major=new JLabel(还书时间: )。 userinput=new JTextField(15)。 usernuminput=new JTextField(15)。 ageinput=new JTextField(15)。 sexinput=new JTextField(15)。 collageinput=new JTextField(15)。 majorinput=new JTextField(15)。 //设置盒式布局并添加组件 Box baseBox,boxV1,boxV2,boxV3,boxV4。 (new FlowLayout())。 boxV1=()。 (alable)。 ((30))。 (userlable)。 ((15))。 (usernumber)。 ((15))。 (age)。 ((15))。 (sex)。 ((15))。 (collage)。 ((15))。 ( major)。 boxV2=()。 /*(10)。 */ ((45))。 (userinput)。 ((11))。 (usernuminput)。 ((11))。 (ageinput)。 ((11))。 (sexinput)。 ((11))。 (collageinput)。 ((11))。 (majorinput)。 boxV3=()。 (boxV1)。 (boxV2)。 boxV4=()。 ok=new JButton(确定 )。 reset=new JButton(取消 )。 (this)。 (this)。 (ok)。 (reset)。 baseBox=()。 (boxV3)。 ((20))。 (boxV4)。 showtext=new JTextArea(9,50)。 /*文本域的一些操作 */ (您新添加的借阅信息如下: )。 add(new JScrollPane(showtext))。 (true)。 /*(()).addDocumentListener(this)。 */ add(showtext)。 (baseBox)。 //让输入用户名的文本框获得焦点 ()。 } @Override public void actionPerformed(ActionEvent e) { // TODO Autogenerated method stub if(()==reset){ (您新添加的借阅信息如下: )。 } else if(().isEmpty()||().isEmpty()||().isEmpty()||().isEmpty()||().isEmpty()||().isEmpty()){ (this, 请 把 信 息 填 写 完 整。 , 警告对话框,)。 } else{ /*此时用户已存在了 */ String usernum=()。 int b。 byte tom[]=new byte[1000000]。 File file=new File(C:\\)。 try{ FileReader in=new FileReader(file)。 BufferedReader inTwo=new BufferedReader(in)。 String s=null。 int a。 while((s=())!=null){ if((a=(usernum))!=1){ flag=1。 (this, 借 阅 已 经 存 在。 , 警告对话框,)。 (null)。 (null)。 (null)。 (null)。 (null)。 (null)。 break。 } } } catch(IOException e1){ (this, 文 件 读 取 失 败。 , 警告对话框,)。 } if(flag==0){ try{ int n=(())。 int m=(())。 String date1=()。 String date2=()。 String eL = [09]{4}[01][09][03][09]。 Pattern p = (eL)。 Matcher mm = (date1)。 Matcher nn=(date2)。 boolean dateFlag = (()amp。 amp。 ())。 if (!dateFlag) { (null)。 (null)。 flag1=1。 (this, 日期格式有误。 , 警告对话框,)。 } if(flag1==0){ inforcount++。 /*计数总人数 */ String s1=()。 (\n+学号: +s1+; )。 String s2=()。 (编号: +s2+; )。 String s3=()。 (姓名: +s3+; )。 String s4=()。 (书名: +s4+; +\n)。 String s5=()。 (借书时间: +s5+; )。 String s6= ()。 (还书时间: +s6+; )。 int n1=(this, 是 否 要 真 的 添 加。 , 确 认 对 话 框 , )。 if(n1==){ /*。 */ String personInfo=/*学号: +*/s1+\r\n+/*姓名: +*/s2+\r\n+/*年龄: +*/s3+\r\n/*+性别:*/+s4+\r\n/*+学院: */+s5+\r\n+/*专业: */s6+\r\n。 byte tom1[]=new byte[1000000]。 tom1=()。 try{ File f=new File(C:\\)。 try { ()。 // 当且仅当不存在具有此抽象路径名指定名称的文件时,不可分地创建一个新的空文件 } catch (IOException e2) { ()。 } FileOutputStream out=new FileOutputStream(f,true)。java编写图书馆管理系统
相关推荐
equestAndGetResponseFromServer(){ DataInputStream keyBoardInputStream=null。 // BufferedReader keyBoardInputStream=null。 String userInputTextFromKeyBoard=null。 String someResultTextFromServer=null。
rver() throws OASystemException{ // DataInputStream keyBoardInputStream=null。 BufferedReader keyBoardInputStream=null。 String userInputTextFromKeyBoard=null。 String someResultTextFromServer =null。
(:)。 keyBoardInputStream = new BufferedReader(new InputStreamReader())。 try { userInputTextFromKeyBoard = (()).trim()。 } catch (IOException e) { ()。 } //识别输入的字符串是否为“ exit” if(!(exit)){
录,一个高效的产品搜索功能,一个稳定灵活的购物车订单功能,一个直观的销售统计报表功能就差不多了。 进销存管理系统的定 义 进销存是指企业管理过程中采购(进) —— 入库(存) —— 销售(销)的动态管理过程。 商品流通企业进销存是从商品的采购(进)到入库(存)到销售(销)的动态管理过程。 制造企业进销存是从原材料的采购(进)到入库(存)到领料加工到产品入库(存)到销售(销)的动态管理过程。
加盟店操作 会员信息 连锁干洗店系统 店员 会员 总店管理员 发布信息 员工操作 结单信息 添加会员信息 删除会员信息 查询信息 会员操作 分店管理员 衣服信息 员工操作 洗衣品信息 统计信息 2. 第二层如图 2 27 所示。 图 26 二层数据流图 1 总店管理员 1 员工操作系统 管理事务 用户名,密码 对应用户 2 加盟店操作系统 总店管理员 管理事务 分店管理员 加盟店信息
35 运行模块组合 35 运行控制 35 运行时间 35 系统数据结构设计 35 逻辑结构设计要点 35 物理结构设计要点 38 数据结构与程序的关系 38 系统出错处理设计 38 出错信息 38 补救措施 38 系统维护设计 38 第四章 详细设计说明书 46 引言……… 46 编写目的 46 背景 47 定义 47 参考资料 48 程序系统的结构 48 系统的层次方框图 48 程序设计说明