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

正文內(nèi)容

java課程設(shè)計---基于java的在線評測系統(tǒng)的設(shè)計與開發(fā)-預(yù)覽頁

2025-02-11 12:49 上一頁面

下一頁面
 

【正文】 念,我覺得這是我這次實踐的第一個收貨.。3怎樣讓在一個類中創(chuàng)建的對象在其他類中可用并且該對象只在內(nèi)存中存在一個?答:可通過依賴注入方法實現(xiàn),例如可用get(),set()方法來實現(xiàn)引用類型參數(shù)傳遞。import 。import 。 //登錄界面 LoginFrame loginFrame=new LoginFrame()。 EntityContext entityContext=new EntityContext()。 (clientContext)。 (loginFrame)。 ()。import 。import 。import 。 //菜單界面 MenuFrame menuFrame。 JTextField idTextField。 int score。 = examFrame。 (true)。 String userPwd=()。 (())。 } catch (Exception e3){ (loginFrame, 系統(tǒng)錯誤!請聯(lián)系系統(tǒng)管理員!)。 curQuestion=().get(0)。 (true)。 final Timer timer=new Timer()。 long s=time/1000%60。 (new TimerTask() { Override public void run() { ()。//到指定Date時間執(zhí)行run方法 } public void next(){ saveUserAnswer()。 } public void pre(){ saveUserAnswer()。//更新面板內(nèi)容 } public void send(){ saveUserAnswer()。 (true)。 (curIndex,userAnswer)。 } public void examFrameExit(){ (false)。 } public void setLoginFrame(LoginFrame loginFrame) { = loginFrame。 } public void setExamFrame(ExamFrame examFrame) { = examFrame。 } public void cancel() { (null)。 } public JPasswordField getPwdField() { return pwdField。import 。import .*。 public WeleWindow(){ // init()。 } public JPanel createContentPane(){ JPanel p=new JPanel(new BorderLayout())。 (,new JLabel(icon))。 (()/2, ()/2)。import .*。 int width=300。 JPasswordField pwdField。 centerFrame()。//設(shè)置內(nèi)邊距 //給主面板添加組件 (,createBottomPane())。 } //創(chuàng)建主面板的中間面板 public JPanel createCenterPane(){ JPanel p = new JPanel(new BorderLayout())。 (createIdPane())。 (,new JLabel(編號:))。 } //創(chuàng)建密碼面板 public JPanel createPwdPane(){ JPanel p = new JPanel(new BorderLayout())。 return p。 } })。 ()。 return p。 } public int getUserId(){ return (())。 } }MenuFrame類代碼:package 。import 。import 。public class MenuFrame extends JFrame{ //屬性 String title=選擇菜單界面。 ClientContext clientContext。 //給窗體設(shè)置初始大小(寬、高) (width, height)。 if(val==){ (0)。 (,createImageLabel())。 } //創(chuàng)建主面板的中間面板(上 下) public JPanel createCenterPane(){ JPanel p=new JPanel(new BorderLayout())。 return p。 (icon)。 (createScoreBtn())。 } //創(chuàng)建帶圖片和文本的開始按鈕 public JButton createStartBtn(){ URL url=()。 } })。 } //創(chuàng)建帶圖片和文本的分?jǐn)?shù)按鈕 public JButton createScoreBtn(){ URL url=()。 } })。 } //創(chuàng)建帶圖片和文本的考試規(guī)則按鈕 public JButton createRuleBtn(){ URL url=()。 } })。 } //創(chuàng)建帶圖片和文本的離開按鈕 public JButton createExitBtn(){ URL url=()。 } })。 }//界面居中 public void centerFrame(){ Toolkit tk=()。 } public ClientContext getClientContext() { return clientContext。 } }ExamService類代碼:package 。import 。import 。 u=(userId)。 } public void startExam(){ //創(chuàng)建試卷 createPaper()。//試卷 有 0題 MapInteger, ListQuestion qs= ()。 level++) { ListQuestion questions=(level)。 i++) { int ranIndex=(())。 } } } public void saveUserAnswer(int curIndex,ListInteger userAnswer){ QuestionInfo qi=(curIndex1)。//將本次的答案保存到當(dāng)前題目的用戶答案中 } public int getScore(){ int score=0。 } public EntityContext getEntityContext() { return entityContext。 } }EntityContext類代碼:package 。import 。import 。//相當(dāng)于題庫(級別級別下所有的題目) public EntityContext(){ initUser()。 try { br = new BufferedReader( new InputStreamReader( new FileInputStream(userTxt)))。 } String[] lines=(:)。 String txtPhone=lines[3]。 } } catch (Exception e) { ()。 String line。 //完成題目的加載 //根據(jù)level 獲取 題目(ListQuestion) if((level)){ ListQuestion questionsInLevel=(level)。 (level, value)。//{2,3} int score=(lineDatas[2])。 ListString options=new ArrayListString()。//C String optionD=()。 (optionD)。// (score)。 return q。 } return answer。 } public MapInteger, ListQuestion getQuestions() { return questions。 User u2=new User(1002, lisi, 1234, 314234134, 2341)。 ((), u3)。 }*/}RuleFrame類代碼package 。import 。import 。import 。 //屬性 String title=考試規(guī)則。 } private void init() { setTitle(title)。//創(chuàng)建主面板 showrule()。 } private void showrule() { File questionTxt=new File()。 String str=。 (null,空指針錯誤)。 } } private Container createContentPane() { JPanel p=new JPanel(new BorderLayout())。 setJ(j)。 } public RuleFrame getRuleFrame() { return ruleFrame。 } }Question類代碼:package 。 ListString options。 int type。 } public void setOptions(ListString options) { = options。 } public void setLevel(int level) { = level。 } public void setType(int type) { = type。import 。 public QuestionInfo() {} public QuestionInfo(Question q, int index) { = q。 } public int getIndex() { return index。 } Override public String toString() { String questionStr=。A39。public class User { int id。 String 。 = phone。 } public String getName() { return name。 } public String getPhone() { return phone。 } package 。 } } .附錄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