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

正文內(nèi)容

基于java語(yǔ)言的計(jì)算器設(shè)計(jì)與實(shí)現(xiàn)畢業(yè)論文-閱讀頁(yè)

2025-07-12 17:39本頁(yè)面
  

【正文】 種良好的學(xué)習(xí)精神是我以后工作上的動(dòng)力,再次感謝老師和幫助過(guò)我的同學(xué)們。import .*。public class Calculator extends Frame implements ActionListener, WindowListener{ private Container container。 private GridBagConstraints constraints。 //計(jì)算結(jié)果顯示區(qū) private String lastCommand。 //保存計(jì)算結(jié)果 private boolean start。 private JMenuItem m_exit,m2_ejz,m2_bjz。 private Label label_dialog。 public Calculator() //構(gòu)造方法設(shè)置布局、為按鈕注冊(cè)事件監(jiān)聽(tīng)器 { super(Calculator)。 (350,300)。 (new GridLayout(7,1))。 //調(diào)用成員方法添加菜單 displayField=new JTextField(30)。 (true)。 result=0。 JPanel panel0=new JPanel()。 JPanel panel1=new JPanel()。 (panel1)。 button_plusminus=new JButton(+/)。 button_CE=new JButton(退格)。 JPanel panel2=new JPanel()。 (panel2)。 button_8=new JButton(8)。 button_log=new JButton(log)。 JPanel panel3=new JPanel()。 (panel3)。 button_5=new JButton(5)。 button_tan=new JButton(tan)。 JPanel panel4=new JPanel()。 (panel4)。 button_2=new JButton(2)。 button_cos=new JButton(cos)。 JPanel panel5=new JPanel()。 (panel5)。 button_point=new JButton(.)。 button_sin=new JButton(sin)。 (button_sqrt)。 (button_exp)。 (button_cancel)。 (button_8)。 (button_log)。 (button_4)。 (button_6)。 (button_multiply)。 (button_2)。 (button_cos)。 (button_0)。 (button_equal)。 (button_plus)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (new WinClose())。 } private void addmyMenu() //菜單的添加 { JMenuBar menubar=new JMenuBar()。 JMenu m1=new JMenu(選項(xiàng))。 JMenuItem m1_exit=new JMenuItem(退出)。 JMenuItem m2_ejz=new JMenuItem(二進(jìn)制)。 JMenuItem m2_bjz=new JMenuItem(八進(jìn)制)。 JMenu m3 = new JMenu( 幫助)。 (this)。 //模式窗口 (240,80)。 //標(biāo)簽的字符串為空,居中對(duì)齊 (label_dialog)。 //為對(duì)話框注冊(cè)窗口事件監(jiān)聽(tīng)器 (m1_exit)。 (m2_ejz)。 (m2)。 (m3)。 if (start) { ()。 if((+/)) (()+)。 if((退格)) //退格鍵的實(shí)現(xiàn)方法 { if(()0) ((0,()1))。 start=true。 } } else if (()==二進(jìn)制) //二進(jìn)制的轉(zhuǎn)換 { int n=(())。 } else if (()==八進(jìn)制) //八進(jìn)制的轉(zhuǎn)換 { int n=(())。 } else if (()==退出) //選項(xiàng)中退出的處理方法 { (0)。幫助39。 (400,250)。 } else //各運(yùn)算符的識(shí)別 { String mand=()。 } else { calculate((()))。 start=true。 if ((+)) result+= x。 else if ((*)) result*=x。 else if ((=)) result=x。 result=d。 result=d。 result=d。 result=d。 result=d。 result=d。 } public void windowClosing(WindowEvent e) { if(()==dialog) (false)。 } public void windowOpened(WindowEvent e) { } public void windowActivated(WindowEvent e) { } public void windowDeactivated(WindowEvent e) { } public void windowClosed(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowDeiconified(WindowEvent e) { } public static void main(String args[]) { Calculator calculator=new Calculator()。 //結(jié)束程序運(yùn)行 } public void windowOpened(WindowEvent e){} public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){}}31
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1