OOPyyyyyyyyyy
- package com.sys;
- import com.validate.*;
- /**
- * Computer 2007
- */
- public class Computer {
- private String[] passWord = new String[100]; // ,
- private String[] card = new String[100];// ,
- private String[] fingerMark = new String[100];// ,
-
- public Computer() {
- passWord[0] = "2222";
- card[0] = "accp";
- fingerMark[0] = "accp";
- }
- /**
- *
- * @return
- */
- public boolean validate(String passStr)
- {
- Validate validate=null;
- String prefix=passStr.substring(0,2);
- /* */
- if(prefix.equals("pa"))
- {
- validate=new PassWordVld(passWord,passStr);
- return validate.check();
- }
- /* */
- else if(prefix.equals("ca"))
- {
- validate=new CardVld(card,passStr);
- return validate.check();
- }
- /* */
- else if(prefix.equals("fi"))
- {
- validate=new FingerMarkVld(fingerMark,passStr);
- return validate.check();
- }else
- {
- return false;
- }
-
-
- }
-
-
- public String[] getPassWord() {
- return passWord;
- }
-
- public String[] getCard() {
- return card;
- }
-
- public String[] getFingerMark() {
- return fingerMark;
- }
-
- }