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

正文內(nèi)容

java實(shí)訓(xùn)標(biāo)準(zhǔn)化考試系統(tǒng)(cs版)(編輯修改稿)

2024-08-10 16:17 本頁面
 

【文章內(nèi)容簡介】 true)。 setBounds(60,40,660,460)。 validate()。 }public void actionPerformed(ActionEvent e){ if(()==開始呼叫){ if(socket!=nullamp。amp。in!=nullamp。amp。out!=null) //清除以往的連接信息 try{ ()。 ()。 ()。 (false)。 } catch(Exception ee){ } String ip=().trim()。 try{ socket = new Socket(ip, 6666)。 in=new DataInputStream(())。 out=new DataOutputStream(())。 } catch (IOException ee){ //如果連接失敗 (呼叫失敗)。 (您呼叫沒有成功)。 } if(socket!=null){ //如果連接成功 InetAddress address=()。 (true)。 (您呼叫:+address+成功)。 (true)。 ()。 (socket,in,out)。 (true)。 ()。 validate()。 } } if(()==開始測試){ if(()){ (socket,in,out)。 (true)。 (你選擇了試題:+選 ())。 ()。 validate()。 } } } public static void main(String args[]){ new Client()。 } }(2)import .*。import .*。import .*。import .*。import .*。public class ChoiceFile extends Panel implements ItemListener,ActionListener,Runnable{ Button 得到試題文件=null。 Choice list=null。 Socket socket=null。 DataInputStream in=null。 DataOutputStream out=null。 Thread thread=null。 boolean success=false, isSelected=false。 int n=0。 public ChoiceFile(){ 得到試題文件=new Button(將試題文件添加到下拉列表中)。 (false)。 (this)。 list=new Choice()。 (**********)。 add(得到試題文件)。 add(list)。 (this)。 thread=new Thread(this)。 } public void setSocketConnection(Socket socket,DataInputStream in,DataOutputStream out){ =socket。 =in。 =out。 try { ()。 } catch(Exception ee) { } if(!=null){ (true)。 } } public void actionPerformed(ActionEvent e){ try { (列出考試文件)。 } catch(IOException ee){ success=false。 } } public void itemStateChanged(ItemEvent e){ n=()。 if(n=1amp。amp。isSelected==true){ String listItem=()。 try{ (考試文件的名字:+listItem)。 (請通知考試界面考試用時:)。 } catch(IOException ee){ } } } public String 得到選擇的文件名(){ return ()。 } public void run(){ String s=null。 ()。 while(true){ try{ s=()。//等待(堵塞本線程,直到收到信息)服務(wù)器端發(fā)來的信息 if((考試文件:)){ String listItem=((:)+1)。 (listItem)。 isSelected=true。 } if((已經(jīng)全部列出:)){ success=true。 break。 } catch (Exception ee){ } } } public boolean getSuccess(){ n=()。 if(n0amp。amp。success==true) return true。 else return false。 }}(3)import .*。import .*。import .*。import .*。import .*。public class ClientTestArea extends Panel implements ActionListener,Runnable{ Socket socket=null。 // 和服務(wù)器所建立的連接的套接字。 DataInputStream in=null。 //讀取服務(wù)器信息的輸入流。 DataOutputStream out=null。 //向服務(wù)器發(fā)送信息的輸出流。 Thread threadMessage=null。 //讀取服務(wù)器端信息的線程。 TextArea 試題顯示區(qū)=null,答案顯示區(qū)=null。 Checkbox box[]。 //答案選項(xiàng)。 String answer=?。 //設(shè)置答案的缺省值。 long time=0。 //試題文件的考試用時(單位:毫秒)。 Timer 計(jì)時器=null。 //計(jì)時器。 Button 提交該題答案,讀取下一題,查看得分。 TextField 考試用時提示條=null。 public ClientTestArea(){ threadMessage=new Thread(this)。 //創(chuàng)建讀取服務(wù)器信息的線程。 試題顯示區(qū)=new TextArea(,16,5,)。 答案顯示區(qū)=new TextArea(,3,5,)。 (new Font(TimesRoman,14))。 (new Font(TimesRoman,14))。 ()。 (null)。 (new Color(255,100,100))。 (單擊查看得分按鈕,可以在這里看到得分和正確答案)。 計(jì)時器=new Timer(1000,this)。 //創(chuàng)建計(jì)時器,該計(jì)時器每隔1秒“振鈴”一次。 String s[]={A,B,C,D}。 box=new Checkbox[4]。 for(int i=0。i4。i++){ box[i]=new Checkbox(s[i])。 } 提交該題答案=new Button(提交該題答案)。 讀取下一題=new Button(讀取下一題)。 查看得分=new Button(查看得分)。 考試用時提示條=new TextField(顯示考試用時(倒計(jì)時),28)。 ()。 (false)。 (true)。 (false)。 (false)。 (this)。 (this)。 (this)。 Panel pAddbox=new Panel()。 for(int i=0。i4。i++){ (box[i])。 } setLayout(new BorderLayout())。 Pa
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1