freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java課程設(shè)計(jì)---基于java的在線評測系統(tǒng)的設(shè)計(jì)與開發(fā)-閱讀頁

2025-02-02 12:49本頁面
  

【正文】 JButton exitBtn=new JButton(離開, icon)。 } })。 ()。 }//界面居中 public void centerFrame(){ Toolkit tk=()。 (()/2, ()/2)。 } public ClientContext getClientContext() { return clientContext。 } public RuleFrame getRuleFrame() { return ruleFrame。 } }ExamService類代碼:package 。import 。import 。import 。import 。 ListQuestionInfo paper。 u=(userId)。 } if(().equals(userPwd)){ //登錄成功 return u。 } public void startExam(){ //創(chuàng)建試卷 createPaper()。// (q)。//試卷 有 0題 MapInteger, ListQuestion qs= ()。 for (int level = 1。 level++) { ListQuestion questions=(level)。 //每個級別隨機(jī)取兩題 for (int i = 0。 i++) { int ranIndex=(())。 QuestionInfo qi=new QuestionInfo(q, index++)。 } } } public void saveUserAnswer(int curIndex,ListInteger userAnswer){ QuestionInfo qi=(curIndex1)。 ()。//將本次的答案保存到當(dāng)前題目的用戶答案中 } public int getScore(){ int score=0。 } } return score。 } public EntityContext getEntityContext() { return entityContext。 } public ListQuestionInfo getPaper() { return paper。 } }EntityContext類代碼:package 。import 。import 。import 。import 。public class EntityContext { MapInteger, User users= new HashMapInteger, User()。//相當(dāng)于題庫(級別級別下所有的題目) public EntityContext(){ initUser()。 } public void initUser(){ // 加載到users集合中 File userTxt=new File()。 try { br = new BufferedReader( new InputStreamReader( new FileInputStream(userTxt)))。// 0 登錄成功 1 查無此人 2 密碼錯誤 String line。 } String[] lines=(:)。 String txtName=lines[1]。 String txtPhone=lines[3]。 User u=new User(txtId, txtName, txtPwd, txtPhone, txtEmail)。 } } catch (Exception e) { ()。 BufferedReader br。 String line。 } Question q=parseQuestion(line,br)。 //完成題目的加載 //根據(jù)level 獲取 題目(ListQuestion) if((level)){ ListQuestion questionsInLevel=(level)。 }else{ //如果level 在map中不存在 ListQuestion value =new ArrayListQuestion()。 (level, value)。 } } public Question parseQuestion(String line,BufferedReader br) throws IOException{ //line answer=2/3,score=5,level=5 String[] lineDatas=([,][az]+=)。//{2,3} int score=(lineDatas[2])。 String content=()。 ListString options=new ArrayListString()。//A String optionB=()。//C String optionD=()。 (optionB)。 (optionD)。//需要完成Question類 (content)。// (score)。 (answer)。 return q。//將題庫中答案以“/”分割成單獨(dú)元素 ListInteger answer=new ArrayListInteger()。 } return answer。 } public MapInteger, User getUsers() { return users。 } public MapInteger, ListQuestion getQuestions() { return questions。 } /**public static void main(String[] args) { MapInteger, User users= new HashMapInteger, User()。 User u2=new User(1002, lisi, 1234, 314234134, 2341)。 ((), u1)。 ((), u3)。 User user=(1002)。 }*/}RuleFrame類代碼package 。import 。import 。import 。import 。import 。import 。public class RuleFrame extends JFrame{ RuleFrame ruleFrame。 //屬性 String title=考試規(guī)則。 int height=200。 } private void init() { setTitle(title)。 centerFrame()。//創(chuàng)建主面板 showrule()。 Dimension d=()。 } private void showrule() { File questionTxt=new File()。 try { br = new BufferedReader( new InputStreamReader( new FileInputStream(questionTxt)))。 String str=。 } try{ str=str+line+\n+\n。 (null,空指針錯誤)。 //(menuFrame, line)。 } } private Container createContentPane() { JPanel p=new JPanel(new BorderLayout())。 j=new JTextArea(tfasdha)。 setJ(j)。 (q)。 } public RuleFrame getRuleFrame() { return ruleFrame。 } public JTextArea getJ() { return j。 } }Question類代碼:package 。public class Question {// int index。 ListString options。 int level。 int type。 } public void setContent(String content) { = content。 } public void setOptions(ListString options) { = options。 } public void setScore(int score) { = score。 } public void setLevel(int level) { = level。 } public void setAnswer(ListInteger answer) { = answer。 } public void setType(int type) { = type。 }}QuestionInfo類代碼:package 。import 。 int index。 public QuestionInfo() {} public QuestionInfo(Question q, int index) { = q。 } public Question getQ() { return q。 } public int getIndex() { return index。 } public ListInteger getUserAnswer() { return userAnswer。 } Override public String toString() { String questionStr=。 ListString options=()。A39。 } return questionStr。public class User { int id。 String pwd。 String 。 = name。 = phone。 } public int getId() { return id。 } public String getName() { return name。 } public String getPwd() { return pwd。 } public String getPhone() { return phone。 } public String getEmail() { return 。 } package 。 } public IdOrPwdException(String message) { super(message)。 } } .附錄2 參考文獻(xiàn) [1]林邦杰,:電子工業(yè)出版社,2002年 [2][M]. 北京:冶金工業(yè)出版社,2007年[3][M]. 北京:清華大學(xué)出版社,2003年[4]高林,[M]. 北京:人民郵電出版社,2004年[5]劉騰紅,[M]. 北京:科學(xué)出版社,2003年4747
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1