91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 730KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-01
  • 語言: Java
  • 標簽:

資源簡介

用java基本語言編寫的在線考試系統,里面包括網絡版和本地版兩種。

資源截圖

代碼片段和文件信息

package?com.tarena.elts.client;

import?java.io.IOException;
import?java.io.objectInputStream;
import?java.io.objectOutput;
import?java.io.objectOutputStream;
import?java.net.Socket;
import?java.net.UnknownHostException;
import?java.util.List;

import?com.tarena.elts.entity.ExamInfo;
import?com.tarena.elts.entity.QuestionInfo;
import?com.tarena.elts.entity.User;
import?com.tarena.elts.server.Request;
import?com.tarena.elts.server.Response;
import?com.tarena.elts.service.Consts;
import?com.tarena.elts.service.ExamNotFinishException;
import?com.tarena.elts.service.ExamOverException;
import?com.tarena.elts.service.ExamService;
import?com.tarena.elts.service.NameOrPasswordException;
import?com.tarena.util.Config;
//TODO?Day5
public?class?ExamServiceAgentImpl?
??implements?ExamService?{
??
??private?Config?config;
??private?String?sessionId?=?null;?
??
??public?ExamServiceAgentImpl(Config?config?)?{
????this.config?=?config;
??}
??
??public?User?login(int?id?String?pwd)?
????throws?NameOrPasswordException?{
????Response?res?=?sendRequest(“login“?
????????new?Class[]{int.class?String.class}
????????new?object[]{id?pwd});
????if(res.isSuccess())
??????return?(User)res.getValue();
????if(res.getState()==Consts.ERR_NAME_OR_PWD){
??????throw?new?NameOrPasswordException(res.getMessage());
????}
????throw?new?RuntimeException(res.getMessage());
??}

??public?ExamInfo?start()?throws?ExamOverException?{
????Response?res?=?sendRequest(“start“?
????????new?Class[]{}
????????new?object[]{});
????if(res.isSuccess())
??????return?(ExamInfo)res.getValue();
????if(res.getState()==Consts.ERR_EXAM_OVER){
??????throw?new?ExamOverException(res.getMessage());
????}
????throw?new?RuntimeException(res.getMessage());
??}


??public?QuestionInfo?getQuestion(int?index)?
????throws?ExamOverException?{
????Response?res?=?sendRequest(“getQuestion“?
????????new?Class[]{int.class}
????????new?object[]{index});
????if(res.isSuccess())
??????return?(QuestionInfo)res.getValue();
????if(res.getState()==Consts.ERR_EXAM_OVER){
??????throw?new?ExamOverException(res.getMessage());
????}
????throw?new?RuntimeException(res.getMessage());

??}

??public?void?sendUserAnswers(
??????int?questionIndex?List?answers)?{
????Response?res?=?sendRequest(“sendUserAnswers“?
????????new?Class[]{int.class?List.class}
????????new?object[]{questionIndex?answers});
????if(res.isSuccess())
??????return?;
????throw?new?RuntimeException(res.getMessage());
??}
??public?int?commit()?{
????Response?res?=?sendRequest(“commit“?
????????new?Class[]{}
????????new?object[]{});
????if(res.isSuccess())
??????return?(Integer)res.getValue();
????throw?new?RuntimeException(res.getMessage());
??}

??public?int?result()?throws?ExamNotFinishException?{
????Response?res?=?sendRequest(“result“?
????????new?Class[]{}
????????new?object[]{});
????if(res.isSuccess())
??????return?(Integer)res.getValue();
????if

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-02-18?16:22??T_ELTS_1101\
?????文件?????????232??2011-02-14?09:38??T_ELTS_1101\.classpath
?????文件?????????387??2011-02-14?09:38??T_ELTS_1101\.project
?????文件??????162100??2011-02-17?09:31??T_ELTS_1101\all.cld
?????目錄???????????0??2011-02-18?09:54??T_ELTS_1101\bin\
?????目錄???????????0??2011-02-18?09:54??T_ELTS_1101\bin\com\
?????目錄???????????0??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\
?????目錄???????????0??2011-02-18?11:43??T_ELTS_1101\bin\com\tarena\elts\
?????目錄???????????0??2011-02-18?15:21??T_ELTS_1101\bin\com\tarena\elts\client\
?????文件????????5473??2011-02-18?15:34??T_ELTS_1101\bin\com\tarena\elts\client\ExamServiceAgentImpl.class
?????文件????????2067??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\client\Main.class
?????文件????????1870??2011-02-18?15:21??T_ELTS_1101\bin\com\tarena\elts\client\NetMain.class
?????目錄???????????0??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\entity\
?????文件????????6188??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\entity\EntityContext.class
?????文件????????2116??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\entity\ExamInfo.class
?????文件????????3784??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\entity\Question.class
?????文件????????1904??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\entity\QuestionInfo.class
?????文件????????2147??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\entity\User.class
?????目錄???????????0??2011-02-18?09:55??T_ELTS_1101\bin\com\tarena\elts\gui\
?????文件?????????864??2011-02-18?09:56??T_ELTS_1101\bin\com\tarena\elts\gui\ClientContext$1.class
?????文件?????????993??2011-02-18?09:56??T_ELTS_1101\bin\com\tarena\elts\gui\ClientContext$2.class
?????文件????????7576??2011-02-18?09:56??T_ELTS_1101\bin\com\tarena\elts\gui\ClientContext.class
?????文件????????3573??2010-12-25?23:28??T_ELTS_1101\bin\com\tarena\elts\gui\exam.png
?????文件?????????868??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\gui\Examframe$1.class
?????文件?????????929??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\gui\Examframe$2.class
?????文件?????????929??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\gui\Examframe$3.class
?????文件?????????929??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\gui\Examframe$4.class
?????文件?????????615??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\gui\Examframe$Option.class
?????文件????????7661??2011-02-18?09:54??T_ELTS_1101\bin\com\tarena\elts\gui\Examframe.class
?????文件???????20210??2010-12-26?17:50??T_ELTS_1101\bin\com\tarena\elts\gui\exam_title.png
?????文件????????3846??2008-07-21?04:58??T_ELTS_1101\bin\com\tarena\elts\gui\exit.png
............此處省略134個文件信息

評論

共有 條評論

相關資源