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

正文內(nèi)容

java實(shí)訓(xùn)標(biāo)準(zhǔn)化考試系統(tǒng)(cs版)-資料下載頁

2025-07-14 16:17本頁面
  

【正文】 ileName[]=(fileTxt)。 //列出當(dāng)前目錄下 的所有 //文本文件,即試題文件。 for(int i=0。i。i++) { (考試文件:+fileName[i])。 //將試題文件名字 依次發(fā)送給客戶端。 } (已經(jīng)全部列出:)。 } else if((考試文件的名字:)){ String fileName=((:)+1)。 //獲取客戶 端選擇的試題文件名。 (fileName)。 (false)。 通知考試界面考試用時(shí)=true。//服務(wù)器需通知客戶端新試題文件 的考試用時(shí)。 } else if((讀取下一題)){ String contentTest=()。 //讀取一道試題。 (試題內(nèi)容:+contentTest)。//將試題的內(nèi)容發(fā)送給客戶端。 if(通知考試界面考試用時(shí)==true){ long time=()。 //將當(dāng)前試題文件的考試用時(shí)發(fā)給客戶端。 (考試用時(shí):+time)。 通知考試界面考試用時(shí)=false。 } if(()){ (考試結(jié)束:)。 } } else if((提交的答案:)){ //獲取用戶提交的答案。 String answer=((:)+1)。 //將用戶提交的 答案依次尾加到selection。 (answer)。 } else if((查看得分)){ int score=()。 String messages=()。 (分?jǐn)?shù):+score+\n+messages)。 } } catch(IOException ee){ try{ ()。 } catch(Exception eee){ } (客戶離開了)。 break。 } } }}(5)import .*。import .*。public class ReadTestquestion{ String filename=, //存放試題文件名的字符串。 correctAnswer=, //存放正確答案的字符串。 testContent= , //試題內(nèi)容。 selection= 。 //存放用戶提交的答案。 int score=0。 //用戶的得分。 long time=0。 //該試題文件的考試用時(shí)。 boolean 完成考試=false。 //判斷是否已完成全部試題。 File f=null。 FileReader in=null。 BufferedReader 讀取=null。public void setFilename(String name{ filename=name。 score=0。 //用戶選擇了新的試題文件后,將用戶的答 案字符串清空,并將分?jǐn)?shù)重置為0。 selection=。 try { if(in!=nullamp。amp。讀取!=null){ ()。 //關(guān)閉此前的連接。 ()。 } f=new File(filename)。 in=new FileReader(f)。 讀取=new BufferedReader(in)。 //讀取試題文件的第1行: correctAnswer=(()).trim()。//標(biāo)準(zhǔn)答案,并除去前后空格。 String temp=(()).trim() 。 //讀取試題文件的第2行:考試用時(shí)。 StringTokenizer token=new StringTokenizer(temp,:)。 int hour=(()) 。//獲取用時(shí)的“時(shí)”值。 int minute=(())。//獲取用時(shí)的“分”值。 int second=(())。//獲取用時(shí)的“秒”值。 time=1000*(second+minute*60+hour*60*60)。 //將用時(shí)轉(zhuǎn)換成毫秒單位。 } catch(Exception e){ testContent=沒有選擇試題。 } } public String getFilename(){ return filename。 } public long getTime(){ return time。 } public void set完成考試(boolean b){ 完成考試=b。 } public boolean get完成考試(){ return 完成考試。 } public String getTestContent() //獲取試題的內(nèi)容。{ try { String s=null。 StringBuffer temp=new StringBuffer()。 if(讀取!=null){ //如果客戶選擇了試題文件,讀取就不為空。 while((s=())!=null) { //繼續(xù)讀取某個(gè)試題內(nèi)容。 if((**)) //試題的結(jié)束標(biāo)志。 break。 (\n+s)。 if((endend)){//整個(gè)試題文件的結(jié)束標(biāo)志。 ()。 //關(guān)閉和文件的連接。 ()。 完成考試=true。 //已完成全部試題。 } } testContent=new String(temp)。 } else{ testContent=new String(沒有選擇試題)。 } } catch(Exception e){ testContent=試題內(nèi)容為空,考試結(jié)束??!。 } return testContent。 } public void setSelection(String s){ selection=selection+s。 //將用戶提交的答案依次尾加到 selection。 } public int getScore(){ score=0。 int length1=()。 //用戶提交的第i題答案在 selection中的位置。 int length2=()。 int min=(length1,length2)。 for(int i=0。imin。i++){ try{ //計(jì)算用戶得分。 if((i)==(i)) score++。 } catch(StringIndexOutOfBoundsException e) { i=0。 } } return score。 }public String getMessages(){ int length1=()。 //用戶已提交的答案?jìng)€(gè)數(shù)。 int length2=()。 int length=(length1,length2)。 String message=正確答案:+(0,length)+\n+ 你的回答:+selection+\n。 return message。 } }寧可累死在路上,也不能閑死在家里!寧可去碰壁,也不能面壁。是狼就要練好牙,是羊就要練好腿。什么是奮斗?奮斗就是每天很難,可一年一年卻越來越容易。不奮斗就是每天都很容易,可一年一年越來越難。能干的人,不在情緒上計(jì)較,只在做事上認(rèn)真;無能的人!不在做事上認(rèn)真,只在情緒上計(jì)較。拼一個(gè)春夏秋冬!贏一個(gè)無悔人生!早安!—————獻(xiàn)給所有努力的人.學(xué)習(xí)參考
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1