一个公司要求一个简单的员工数据库系统,去管理公司的人员。比如: 员工姓名,ID号,性别,生日,家庭住址,所在部门)要保存在数据库中。公司要求能 :添加和删除员工信息,查看和更改 员工信息。最多50个员工。
(要求  使用简单的GUI, 用array 储存员工数据)请大家帮帮,(或把类似题目的的连接 发一下) 谢谢!本人才刚学,越简单越好!本人邮箱: [email protected]

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【wu2kai】截止到2008-07-23 01:28:54的历史汇总数据(不包括此帖):
    发帖的总数量:9                        发帖的总分数:95                       每贴平均分数:10                       
    回帖的总数量:7                        得分贴总数量:0                        回帖的得分率:0%                       
    结贴的总数量:7                        结贴的总分数:75                       
    无满意结贴数:0                        无满意结贴分:0                        
    未结的帖子数:2                        未结的总分数:20                       
    结贴的百分比:77.78 %               结分的百分比:78.95 %                  
    无满意结贴率:0.00  %               无满意结分率:0.00  %                  
    楼主加油
      

  2.   

    如果用数据库还好搞下个netbeans,创建swing程序,一步步就搞定了,很简单的一个输入、删除数据的界面。
      

  3.   

    是要求不用服务端的数据库吧,用桌面数据库就可以啦。access、sqlite、firebird embed都可以,而且比用array方便了吧。
      

  4.   

    直接用xml文档,或者用excel文件也可以,那样比较方便,直接打开就可以编辑了,呵呵。
      

  5.   

    一个公司要求一个简单的员工数据库系统
    员工信息管理 ~系统,要求用array 储存员工数据,不用数据库!
    数据库管理系统 不用数据库?
    只存放在array中 信息只会存放在内存中
    如果程序重启或者电脑重启
    那内存中的信息不是都没了?
    不存储在持久介质中怎么行?
      

  6.   

    excel?不知道是不是要用jdbc-odbc桥了。jdk本身带数据库(derby),所以这不是问题。xml倒是个好主意。
      

  7.   


    谢谢大家意见, 我现在学的还没涉及到数据库,只能用arry,程序重启或者电脑重启 消失 无所谓
      

  8.   

    excel, access  或xml比较理想
      

  9.   

    http://www.blogjava.net/ctguzhupan/archive/2006/10/07/73605.html
      

  10.   

    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.ArrayList;
    import java.util.LinkedList;
    import java.util.List;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;public class LoginValidateServerlet extends HttpServlet { /**
     * Constructor of the object.
     */
    private List list;

    public LoginValidateServerlet()
    {
    list=new ArrayList();
    userbean userb1=new userbean("Berry","red","I am berry!");
    list.add(userb1);
    userbean userb2=new userbean("Wattermelon","Radandblack","I am Wattermelon and my color is Radandblack!");
    list.add(userb2);
    userbean userb3=new userbean("Apple","Blue","I am apple in Blue!");
    list.add(userb3);
    } /**
     * Destruction of the servlet. <br>
     */
    public void destroy() {
    super.destroy(); // Just puts "destroy" string in log
    // Put your code here
    } /**
     * The doGet method of the servlet. <br>
     *
     * This method is called when a form has its tag value method equals to get.
     * 
     * @param request the request send by the client to the server
     * @param response the response send by the server to the client
     * @throws ServletException if an error occurred
     * @throws IOException if an error occurred
     */
    public String judge(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    {
    String name=request.getParameter("name");
    String password=request.getParameter("password");


    for(int i=0;i<list.size();i++)
    {
    if(((userbean)list.get(i)).getname().equals(name)&&((userbean)list.get(i)).getpass().equals(password))
    {
    String userinfo=((userbean)list.get(i)).getintro().toString();
    return userinfo;
    }

    }
    return null;
    }
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    String name=request.getParameter("name");
    String password=request.getParameter("password");
    String userinfo=this.judge(request, response);
    //来个判断

    if(userinfo!=null)
    {
    request.setAttribute("userinfo",userinfo);
    request.getRequestDispatcher("userInfo.jsp").forward(request,response);
    }
    else
    response.sendRedirect("login.jsp");


    }
       
    /**
     * The doPost method of the servlet. <br>
     *
     * This method is called when a form has its tag value method equals to post.
     * 
     * @param request the request send by the client to the server
     * @param response the response send by the server to the client
     * @throws ServletException if an error occurred
     * @throws IOException if an error occurred
     */
    /**
     * Initialization of the servlet. <br>
     *
     * @throws ServletException if an error occurs
     */

    public void init() throws ServletException {
    // Put your code here
    }}
      

  11.   

    public class userbean {
    private String username;
    private String password;
    private String Introduction;
    public userbean(String username,String password,String intro)
    {
    this.username=username;
    this.password=password;
    this.Introduction=intro;
    }
    public String getname()
    {
    return this.username;
    }
    public String getpass()
    {
    return this.password;
    }
    public String getintro()
    {
    return this.Introduction;
    }
    }
      

  12.   

    写一个class啊?然后,将类名传给Array就OK了!
      

  13.   

    本人菜鸟 一头! 才刚学了array, 简单的 GUI,就布置了这样的作业! 楼上朋友给的 package javax.servlet 不存在,我都不懂 怎么回事!  还请大家弄点简单的解答!
      

  14.   

    是学Java吧
    只要将建立一个员工类例如:Employee.class,在该类里建立似有成员数据(姓名,性别之类的),用来存储员工的信息
    这样每声明一个employee的实例就代表一个员工然后在主程序中建立一个employees数组 Employee[] employees = new Employee[10],这样在对每个对象进行实例化就可以了
    emploees[0] = new Employee(参数);
      

  15.   

    package javax.servlet 不存在,怎么解决
      

  16.   

    谢谢了,
    这个上还有几十分,你回复一下, 也给你
    http://topic.csdn.net/u/20080723/00/9820047f-a26e-4aea-aca8-0c119a7713e9.html