• 大小: 496KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: 其他
  • 标签: 简单  

资源简介

特别简单的大学作业,图书馆订座系统,还是上传来了

资源截图

代码片段和文件信息

package file;

import homeworksecond.Management;
import homeworksecond.Person;
import homeworksecond.Seat;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.objectInputStream;
import java.io.objectOutputStream;
import java.util.linkedList;
import java.util.Vector;

public class File {
public void save(linkedList plinkedList m1linkedList s)
{
try
  {
  FileOutputStream fo=new FileOutputStream(“person.dat“);
  objectOutputStream so=new objectOutputStream(fo);
  so.writeobject((linkedList)p);
  so.close();
  }
  catch(Exception e)
  {
  System.err.println(e);
  }
try
  {
  FileOutputStream fo=new FileOutputStream(“management.dat“);
  objectOutputStream so=new objectOutputStream(fo);
  so.writeobject((linkedList)m1);
  so.close();
  }
  catch(Exception e)
  {
  System.err.println(e);
  }
try
  {
  FileOutputStream fo=new FileOutputStream(“seat.dat“);
  objectOutputStream so=new objectOutputStream(fo);
  so.writeobject((linkedList)s);
  so.close();
  }
  catch(Exception e)
  {
  System.err.println(e);
  }
}
public Vector read(linkedList plinkedList m1linkedList s)
{
Vector v=new Vector();
try
  {
  FileInputStream fi=new FileInputStream(“person.dat“);
  objectInputStream si=new objectInputStream(fi);
  p=(linkedList)si.readobject();
  si.close();
  }
  catch(Exception e)
  {
  System.err.println(e);
  }
try
  {
FileInputStream fi=new FileInputStream(“management.dat“);
  objectInputStream si=new objectInputStream(fi);
  m1=(linkedList)si.readobject();
  si.close();
  }
  catch(Exception e)
  {
  System.err.println(e);
  }
try
  {
FileInputStream fi=new FileInputStream(“seat.dat“);
  objectInputStream si=new objectInputStream(fi);
  s=(linkedList)si.readobject();
  si.close();
  }
  catch(Exception e)
  {
  System.err.println(e);
  }
v.add(p);
v.add(m1);
v.add(s);
  return v;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        601  2015-12-18 17:02  java\homeworksecond\.classpath

     文件        390  2015-09-28 21:51  java\homeworksecond\.project

     文件        598  2015-09-28 21:51  java\homeworksecond\.settings\org.eclipse.jdt.core.prefs

     文件       2871  2015-12-28 18:04  java\homeworksecond\bin\file\File.class

     文件       3503  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Land.class

     文件       2886  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Landm.class

     文件        695  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Main.class

     文件       7181  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Management.class

     文件       2856  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Menu.class

     文件        595  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Overtime.class

     文件      13417  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Person.class

     文件       2944  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Register.class

     文件        174  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Registerall.class

     文件       2927  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Registerm.class

     文件        544  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Sameseat.class

     文件       2405  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Seat.class

     文件        718  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Sort.class

     文件        579  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\Wrongfloor.class

     文件        543  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\WrongInput.class

     文件        567  2015-12-28 18:04  java\homeworksecond\bin\homeworksecond\WrongseatException.class

     文件       3874  2015-12-28 18:04  java\homeworksecond\bin\JMysqlpackage\Mysqlconnect.class

     文件       3912  2015-12-28 18:33  java\homeworksecond\bin\Swingpackage\SJtime$1.class

     文件        740  2015-12-28 18:33  java\homeworksecond\bin\Swingpackage\SJtime$2.class

     文件       2482  2015-12-28 18:33  java\homeworksecond\bin\Swingpackage\SJtime.class

     文件        834  2015-12-28 18:35  java\homeworksecond\bin\Swingpackage\SLPerson$1.class

     文件       1221  2015-12-28 18:35  java\homeworksecond\bin\Swingpackage\SLPerson$2.class

     文件        923  2015-12-28 18:35  java\homeworksecond\bin\Swingpackage\SLPerson$3.class

     文件       1272  2015-12-28 18:35  java\homeworksecond\bin\Swingpackage\SLPerson$4.class

     文件        979  2015-12-28 18:35  java\homeworksecond\bin\Swingpackage\SLPerson$5.class

     文件        963  2015-12-28 18:35  java\homeworksecond\bin\Swingpackage\SLPerson$6.class

............此处省略121个文件信息

评论

共有 条评论