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

正文內容

基于java交通考試的開發(fā)與研究(已改無錯字)

2023-07-08 17:36:11 本頁面
  

【正文】 try { while(bConnect) { obj = ()。 String str = ()。(str)。 if(!(ExamInformation)) { examID = str。 rs = (select * from driverInfo where examID = 39。 + examID + 39。)。 ()。 if(() == 0) { (error)。 } else { name = (2)。 type = 貨物運輸。 rs = (select top 50 * from examQuestions where type = 39。貨物運輸39。 order by newid())。 for(int i=0。 i50。 i++) { ()。 examQuestions[i] = new ExamQuestion()。 examQuestions[i].setQuestion((1))。 examQuestions[i].setAnswerA((2))。 examQuestions[i].setAnswerB((3))。 examQuestions[i].setAnswerC((4))。 examQuestions[i].setNumber(i+1 + )。 examQuestions[i].setRightAnswer((5))。 } examInformation = new ExamInformation(examID, name, type, examQuestions)。 (examInformation)。 } } } } catch (EOFException e) { (客戶端斷開!)。 } catch (Exception e) { ()。 } finally { try { if(ois != null) ()。 if(oos != null) ()。 if(s != null) { ()。 s = null。 } } catch (IOException e) { ()。 } } } }}考生登錄比較簡單,運行后首先與服務器端建立連接,登錄成功后輸入用戶名密碼,程序將此數(shù)據(jù)發(fā)送至服務器端,服務器端到數(shù)據(jù)庫中驗證,正確則返回正確口令,否則返回錯誤口令,則當前客戶端成未準備狀態(tài)。public class ExamLoginDialog extends JFrame { private static final long serialVersionUID = 1L。 private ExamLoginDialog thisDialog = this。 private JPanel contentPane。 private JTextField loginID。 public Socket s = null。 public ObjectOutputStream oos = null。 public ObjectInputStream ois = null。 public static void main(String[] args) { (new Runnable() { public void run() { try { ExamLoginDialog frame = new ExamLoginDialog()。 (true)。 } catch (Exception e) { ()。 } } })。 } public ExamLoginDialog() { setIconImage(().getImage((//doufuguolyl/img/)))。 setDefaultCloseOperation()。 setBounds(100, 100, 394, 184)。 contentPane = new JPanel()。 (new EmptyBorder(5, 5, 5, 5))。 (null)。 setContentPane(contentPane)。 JLabel label = new JLabel(\u8BF7\u8F93\u5165\u60A8\u7684\u51C6\u8003\u8BC1\u53F7\uFF1A)。 (new Font(宋體, , 14))。 (25, 32, 150, 16)。 (label)。 loginID = new JTextField()。 (new EnterListener())。 (10)。 (178, 30, 176, 21)。 (loginID)。 JButton btEnter = new JButton(\u8FDB\u5165\u8003\u8BD5)。 (new EnterListener())。 (69, 89, 93, 23)。 (btEnter)。 JButton btQuit = new JButton(\u9000\u51FA\u8003\u8BD5)。 (new ActionListener() { public void actionPerformed(ActionEvent e) { (0)。 } })。 (208, 89, 93, 23)。 (btQuit)。 } class EnterListener implements ActionListener { private Object obj。 public void actionPerformed(ActionEvent arg0) { try { s = new Socket(localhost, 8866)。 ois = new ObjectInputStream(())。 oos = new ObjectOutputStream(())。 (())。 ()。 obj = ()。 if(!().equals(error)) { new ExamClient(thisDialog, obj).initGUI()。 } } catch (ConnectException e) { (服務器無法連接)。 ()。 } catch (IOException e) { ()。 } catch (ClassNotFoundException e) { ()。 } } }}若登錄成功,在服務器端發(fā)來試卷時,在試卷狀態(tài)列表框將顯示收到的試卷,在服務器發(fā)送開始答題命令后,雙擊即可開始答題,試卷的顯示采用與試卷向導顯示的方式,整個窗體類似于一個容器,用來裝載試題。對于四種型題內部采用了四個窗體顯示,在題型變換的過程中顯示某個窗體和隱藏其他窗體,由于這四個窗體是作為子窗體,整體外觀看起來非常的一致。關于數(shù)據(jù)的存儲,同樣的,內部有存儲結構和串行化接口,與試卷的存儲類似。public class ExamClient extends JFrame { private static final long serialVersionUID = 1L。 private ExamLoginDialog mainFrame = null。 private JPanel contentPane。 private JTextArea taQuestion。 private JTextField tfAnswerA。 private JTextField tfAnswerB。 private JTextField tfAnswerC。 private JTable processTable。 private Object elemnets[][]。 private Object columnName[]。 private ExamInformation examInformation。 private ExamQuestion examQuestions[]。 private String answers[]。 public void initGUI() { (new Runnable() { public void run() { try { setVisible(true)。 } catch (Exception e) { ()。 } } })。 } public void initData() { examQuestions = ()。 answers = new String[50]。 elemnets = new Object[5][10]。 columnName = new Object[10]。 for(int i=0。 i5。 i++) { for(int j=0。 j10。 j++) { columnName[j] = 。 int num = i*10 + j。 answers[num] = 。 elemnets[i][j] = i*10 + j+1 + : + answers[num]。 } } } public void getQuestions(int count) { (examQuestions[count].getQuestion())。 } public ExamClient(ExamLoginDialog mainFrame, Object obj) { = mainFrame。 examInformation = (ExamInformation)obj。 initData()。 setIconImage(().getImage((//doufuguolyl/img/)))。 setResizable(false)。 setDefaultCloseOperation()。 setBounds(100, 100, 771, 577)。 contentPane = new JPanel()。 (new EmptyBorder(5, 5, 5, 5))。 (null)。 setContentPane(contentPane)。 JPanel panel = new JPanel()。 (new TitledBorder(null, \u8003\u751F\u4FE1\u606F, , , n
點擊復制文檔內容
教學教案相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1