• 大小: 18KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: Java
  • 标签: Java项目  门禁系统  

资源简介

Java项目-门禁系统 源码注释很详细 Java项目实录

资源截图

代码片段和文件信息

package com.handson.sys;

import com.handson.validate.CardVld;
import com.handson.validate.FingerVld;
import com.handson.validate.PasswordVld;
import com.handson.validate.Validate;

public class Computer {
private String[] pwds   = new String[100];  // 计算机存储的雇员密码,数字字符串
    private String[] cards       = new String[100];  // 计算机存储的雇员胸卡号,字符串形式
    private String[] fingerMarks = new String[100];  // 计算机存储的雇员指纹,字符串形式

    //无参构造方法,创建一组测试用密码、指纹、卡号
    public Computer(){
     pwds[0]   = “2222“;
     cards[0]       = “accp“;
     fingerMarks[0] = “accp“;
    }
    
    //验证
    public boolean validate(String inputMsg){
     boolean bn = false;
        Validate validate = null;
        if (inputMsg.length()>2)
        {
        String prefix = inputMsg.substring(0 2);
        /*验证密码*/
        if(prefix.equals(“pa“)){
         validate = new PasswordVld();
            bn = validate.check(pwds inputMsg);
        }
        /*验证胸卡*/
        else if(prefix.equals(“ca“)){
         validate = new CardVld();
            bn = validate.check(cards inputMsg);
        } 
        /*验证指纹*/
        else if(prefix.equals(“fi“)) {
         validate = new FingerVld();
            bn = validate.check(fingerMarksinputMsg);
        } 
        }
        return bn;
    }

//    //增加新胸卡
//    public void addCards(String card) {
//        for(int i=0;i<100;i++){
//            if(this.cards[i]==null){
//                this.cards[i] = card;
//                return;
//            }
//        }
//    }
//
//    //增加新指纹
//    public void addFingerMarks(String fingerMark) {
//        for(int i=0;i<100;i++){
//            if(this.fingerMarks[i]==null){
//                this.fingerMarks[i] = fingerMark;
//                return;
//            }
//        }
//    }
//
//    //增加新密码
//    public void addPwds(int passWord) {
//        for(int i=0;i<100;i++){
//            if(this.pwds[i]==null){
//                this.pwds[i] = passWord*2+““;
//                return;
//            }
//        }
//    }

    //setter/getter
    public String[] getCards() {
        return cards;
    }
    public String[] getfingerMarks() {
        return fingerMarks;
    }
    public String[] getPassWords() {
        return pwds;
    }
}

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

     文件        232  2010-06-11 09:02  doorproj\.classpath

     文件        384  2008-08-07 16:41  doorproj\.project

     文件       1546  2014-09-23 05:34  doorproj\bin\com\handson\sys\Computer.class

     文件       1026  2014-09-23 05:34  doorproj\bin\com\handson\sys\Door.class

     文件       1980  2014-09-23 05:34  doorproj\bin\com\handson\test\AdminTest.class

     文件       2249  2014-09-23 05:34  doorproj\bin\com\handson\test\EmployeeTest.class

     文件       2170  2014-09-23 05:34  doorproj\bin\com\handson\test\GuestTest.class

     文件       1745  2014-09-23 05:34  doorproj\bin\com\handson\user\Admin.class

     文件        864  2014-09-23 05:34  doorproj\bin\com\handson\user\Employee.class

     文件       1550  2014-09-23 05:34  doorproj\bin\com\handson\user\Guest.class

     文件        765  2014-09-23 05:34  doorproj\bin\com\handson\validate\CardVld.class

     文件        771  2014-09-23 05:34  doorproj\bin\com\handson\validate\FingerVld.class

     文件        777  2014-09-23 05:34  doorproj\bin\com\handson\validate\PasswordVld.class

     文件        177  2014-09-23 05:34  doorproj\bin\com\handson\validate\Validate.class

     文件       2427  2010-06-11 09:03  doorproj\src\com\handson\sys\Computer.java

     文件        830  2010-06-11 09:02  doorproj\src\com\handson\sys\Door.java

     文件       1706  2010-06-11 09:03  doorproj\src\com\handson\test\AdminTest.java

     文件       1678  2010-06-11 09:03  doorproj\src\com\handson\test\EmployeeTest.java

     文件       1799  2010-06-11 09:03  doorproj\src\com\handson\test\GuestTest.java

     文件       1998  2010-06-11 09:03  doorproj\src\com\handson\user\Admin.java

     文件        497  2010-06-11 09:03  doorproj\src\com\handson\user\Employee.java

     文件        848  2010-06-11 09:03  doorproj\src\com\handson\user\Guest.java

     文件        398  2010-06-11 09:03  doorproj\src\com\handson\validate\CardVld.java

     文件        399  2010-06-11 09:03  doorproj\src\com\handson\validate\FingerVld.java

     文件        392  2010-06-11 09:03  doorproj\src\com\handson\validate\PasswordVld.java

     文件        127  2010-06-11 09:03  doorproj\src\com\handson\validate\Validate.java

     目录          0  2014-09-23 05:34  doorproj\bin\com\handson\sys

     目录          0  2014-09-23 05:34  doorproj\bin\com\handson\test

     目录          0  2014-09-23 05:34  doorproj\bin\com\handson\user

     目录          0  2014-09-23 05:34  doorproj\bin\com\handson\validate

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

评论

共有 条评论