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

  • 大小: 7KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-29
  • 語言: Java
  • 標簽: 考試系統??

資源簡介

這是一個用java語言編寫的簡單的客戶端和服務器端考試的小軟件,簡單易用.

資源截圖

代碼片段和文件信息

import?java.awt.*;
import?javax.swing.*;
import?java.awt.event.*;
import?java.io.*;
import?java.net.*;
public?class?ChoiceFile?extends?Panel?implements?ItemListenerActionListenerRunnable
{
???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(“將試題文件添加到下拉列表中“);
??????得到試題文件.setEnabled(false);
??????得到試題文件.addActionListener(this);
??????list=new?Choice();
??????list.add(“**********“);
??????add(得到試題文件);
??????add(list);
??????list.addItemListener(this);
??????thread=new?Thread(this);
????}
??public?void?setSocketConnection(Socket?socketDataInputStream?inDataOutputStream?out)
????{
??????this.socket=socket;
??????this.in=in;
??????this.out=out;?
??????try?{
????????????thread.start();?
??????????}
??????catch(Exception?ee)
??????????{
??????????}
??????if(this.socket!=null)
???????{
?????????得到試題文件.setEnabled(true);
???????}?
????}
???public?void?actionPerformed(ActionEvent?e)
????{
?????????try?
???????????{?
?????????????out.writeUTF(“列出考試文件“);
???????????}
???????????catch(IOException?ee)
???????????{?
?????????????success=false;
???????????}
???????
????}?
??public?void?itemStateChanged(ItemEvent?e)
????{?
??????n=list.getItemCount();
??????if(n>=1&&isSelected==true)
????????{
??????????String?listItem=list.getSelectedItem();
???????????try
??????????????{
????????????????out.writeUTF(“考試文件的名字:“+listItem);
????????????????out.writeUTF(“請通知考試界面考試用時:“);
??????????????}
???????????catch(IOException?ee)
??????????????{
??????????????}
????????}?????????
???}
??public?String?得到選擇的文件名()
???{
????return?list.getSelectedItem();
???}
??public?void?run()
???{
????String?s=null;
????list.removeAll();
????while(true)
??????{?
????????try
???????????{
?????????????s=in.readUTF();??????????
??????????????if(s.startsWith(“考試文件:“))
?????????????????{
???????????????????String?listItem=s.substring(s.indexOf(“:“)+1);
???????????????????list.add(listItem);
???????????????????isSelected=true;
?????????????????}
???????????????if(s.startsWith(“已經全部列出:“))
?????????????????{
???????????????????success=true;?
???????????????????break;
?????????????????}
???????????????
???????????}
????????catch?(Exception?ee)?
???????????{
???????????}???
??????}
?}
?public?boolean?getSuccess()
?{?
???n=list.getItemCount();
???if(n>0&&success==true)
??????return?true;
???else
??????return?false;
?}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2721??2003-09-10?22:07??chap7考試系統(BS)\ChoiceFile.java

?????文件???????3235??2003-12-25?14:42??chap7考試系統(BS)\ClientBS.java

?????文件???????6319??2003-09-10?22:08??chap7考試系統(BS)\ClientTestArea.java

?????文件???????3856??2003-12-21?23:03??chap7考試系統(BS)\ReadTestquestion.java

?????文件???????4303??2003-12-09?09:02??chap7考試系統(BS)\Server.java

?????目錄??????????0??2003-12-16?09:00??chap7考試系統(BS)

-----------?---------??----------?-----??----

????????????????20434????????????????????6


評論

共有 條評論