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

正文內(nèi)容

java計(jì)算器-java課程設(shè)計(jì)-閱讀頁(yè)

2024-09-08 18:09本頁(yè)面
  

【正文】 很多寶貴的意見(jiàn), 還有和同學(xué)一起討論幫我解決了幾個(gè)錯(cuò)誤,老師上實(shí)驗(yàn)課時(shí)講得詳細(xì)并嚴(yán)格要求我們,為我們的課程設(shè)計(jì)起了促進(jìn)作用。 import .*。 public class Calculotor extends Frame { // 聲明三 個(gè)面板的布局 GridLayout lyjl1, lyj12, lyj13。 JTextField lyj。 StringBuffer lyjstr。// l和 y都是運(yùn)算數(shù) int zlyj。// 記憶的數(shù)字 public Calculotor() { super(計(jì)算器 —— 李遠(yuǎn)吉 )。// 實(shí)例化三個(gè)面板的布局 lyj12 = new GridLayout(4, 1, 0, 15)。 lyj = new JTextField(27)。 (false)。 (new Font(宋體 , , 20))。 // 實(shí)例化所有按鈕、設(shè)置其前景色并注冊(cè)監(jiān)聽(tīng)器 hehe0 = new Button(退格 )。 (new Bt())。 ()。 hehe2 = new Button(全部清除 )。 (new Bt())。 ()。 hehe4 = new Button(清除記憶 )。 (new Bt())。 ()。 hehe6 = new Button(結(jié)果并加 )。 (new Bt())。 ()。 hehe8 = new Button(8)。 (new Bt())。 ()。 hehe10 = new Button(/)。 (new Bt())。 ()。 hehe12 = new Button(4)。 (new Bt())。 ()。 hehe14 = new Button(6)。 (new Bt())。 ()。 hehe16 = new Button(%)。 (new Bt())。 ()。 hehe18 = new Button(2)。 (new Bt())。 ()。 hehe20 = new Button()。 (new Bt())。 ()。 hehe22 = new Button(0)。 (new Bt())。 ()。 hehe24 = new Button(.)。 (new Bt())。 ()。 hehe26 = new Button(=)。 (new Bt())。 haha1 = new Panel()。 haha3 = new Panel()。 // 添加面板 haha0中的組件和設(shè)置其在框架中的位置和大小 (lyj)。 // 添加面板 haha1中的組件和設(shè)置其在框架中的位置和大小 (lyjl1)。 (hehe1)。 (10, 65, 300, 25)。 (hehe3)。 (hehe5)。 (10, 110, 60, 150)。// 設(shè)置 haha3的布局 (hehe7)。 (hehe9)。 (hehe11)。 (hehe13)。 (hehe15)。 (hehe17)。 (hehe19)。 (hehe21)。 (hehe23)。 (hehe25)。 (80, 110, 220, 150)。 add(haha0)。 add(haha2)。 setResizable(false)。 } })。 setBounds(100, 100, 320, 280)。 } // 構(gòu)造監(jiān)聽(tīng)器 class Bt implements ActionListener { public void actionPerformed(ActionEvent e2) { try { if (() == hehe1){ (0)。// 清空字符串緩沖區(qū)以準(zhǔn)備接收新的輸入運(yùn)算數(shù) } else if (() == hehe2){ (0)。 } else if (() ==hehe23){// 單擊 +/選擇輸入的運(yùn)算數(shù)是正數(shù)還是負(fù)數(shù) xlyj = (().trim())。 } else if (() == hehe25){// 單擊加號(hào)按鈕獲得xlyj的值和 zlyj的值并清空 y的值 xlyj = (().trim())。// 清空緩沖區(qū)以便接收新的另一個(gè)運(yùn)算數(shù) ylyj = 0d。 } else if (() ==hehe20){// 單擊減號(hào)按鈕獲得xlyj的值和 zlyj的值并清空 y的值 xlyj = (().trim())。 ylyj = 0d。 } else if (() == hehe15){// 單擊乘號(hào)按鈕獲得xlyj的值和 zlyj的值并清空 y的值 xlyj = (().trim())。 ylyj = 0d。 } else if (() == hehe10){// 單擊除號(hào)按鈕獲得xlyj的值和 zlyj的值并空 ylyj的值 xlyj = (().trim())。 ylyj = 0d。 } else if (() == hehe26){// 單擊等號(hào)按鈕輸出計(jì)算結(jié)果 (0)。 break。 break。 break。 break。 (((0 + ())) .toString())。 } } ylyj = 0d。 (數(shù)字格式異常 )。 else ( + (xlyj))。 ylyj = 0d。 ( + ( * xlyj))。 ylyj = 0d。 if (xlyj == 0) { (除數(shù)不能為零 )。 } (0)。 }else if (() == hehe3){ lyjm = 0d。 }else if (() ==hehe5) { lyjm = (().trim())。 (0)。 } else// 選擇的是其他的按鈕 { if (() == hehe22)// 如果選擇的是 0這個(gè)數(shù)字鍵 { if (().trim().equals(0))// 如果顯示屏顯示的為零不做操作 { } else { ((()) .toString())。 } } else if (() == hehe0)// 選擇的是“退格”按鈕 { if (!().trim().equals(0))// 如果顯示屏顯示的不是零 { if (() != 1) { ((() 1, ()).toString())。 (0)。 } else// 其他的數(shù)字鍵 { ((()) .toString())。 } } } catch (NumberFormatException e) { (數(shù)字格式異常 )。 } catch (StringIndexOutOfBoundsException e) { (字符串索引越界 )。 } }
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1