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

正文內(nèi)容

java課程設(shè)計---科學(xué)計算器-java-文庫吧資料

2025-01-27 06:31本頁面
  

【正文】 uItem(粘貼 (P) Ctrl+V)。 (new Font(宋體 , , 12))。 (new Font(宋體 , , 12))。 menu2 = new JMenu(查看 (V))。 /* * 菜單欄 */ myBar = new JMenuBar()。 panel3 = new JPanel(new GridLayout(5, 1, 5, 5))。 panel1 = new JPanel(new GridLayout(1, 3, 10, 10))。//設(shè)置標(biāo)題欄 df = new DecimalFormat(.)。//設(shè)置數(shù)字監(jiān)聽 private DecimalFormat df。 private double result = 0。//字符串返回 private boolean IfResult = true, flag = false。 private ButtonGroup bgb。//單選框 private JCheckBoxMenuItem seeItem3。 濟(jì)南大學(xué)課程設(shè)計 14 private JMenuItem editItem1, editItem2, help1, help2, help3。//創(chuàng)建面板容器 private JMenuBar myBar。 public class CalculatorSimple extends JFrame implements ActionListener { private JTextField tf。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 } 濟(jì)南大學(xué)課程設(shè)計 13 } } /** * main方法 */ public static void main(String[] args) { new Calculator().setVisible(true)。 } } } } /** * 小數(shù)點的事件監(jiān)聽 */ class Dot implements ActionListener{ public void actionPerformed(ActionEvent e) { IfResult = false。 IfResult = true。 } else{ (().trim() + str)。 } if(str==π) { (())。 if(IfResult){ ()。 IfResult = true。 IfResult = true。 } }else{ if(().length() 2){ (().substring(0, ().length() 1))。 //使用退格刪除最后一位字符 }else{ (0)。 ((i))。 result = 0。 if(str == C){ (0)。 IfResult = true。 }else{ getResult((()))。 } else{ if(flag){ IfResult = false。 } /* ′″角度轉(zhuǎn)換 */ /** * 將角度值轉(zhuǎn)換成弧度值,方便三角函數(shù)的計算 */ else if((′″)){ double i = (())。 } /* x^3求立方 */ else if((x^3)){ double i = (())。 } } /* x^2求平方 */ else if((x^2)){ double i = (())。 ((result))。k=j。//強(qiáng)制類型轉(zhuǎn)換 int result=1。 } 濟(jì)南大學(xué)課程設(shè)計 10 /* n!求階乘 */ else if((n!)){ double i = (())。 } /* tan求正切函數(shù) */ else if((tan)){ double i = (())。 } /* cos求余弦函數(shù) */ else if((cos)){ double i = (())。 } } /* sin求正弦函數(shù) */ else if((sin)){ double i = (())。 } /* 1/x求倒數(shù) */ else if((1/x)){ if((()) == 0){ (除數(shù)不能為零 )。 }else{ (負(fù)數(shù)不能求對數(shù) )。 } } 濟(jì)南大學(xué)課程設(shè)計 9 /* log求常用對數(shù) */ else if((log)){ double i = (())。 if(i=0){ /* * () 轉(zhuǎn)換為字符串 * () 按要求保留四位小數(shù) * () 求算數(shù)平方根 */ ((((i))))。 } /** * 運(yùn)算符號的事件監(jiān)聽 */ class Signs implements ActionListener{ public void actionPerformed(ActionEvent e) { /* * 用 ActionEvent對象的 getActionCommand()方法 * 取得與引發(fā)事件對象相關(guān)的字符串 */ String str = ()。} else if(oper == =){result = x。194。){result *= x。} else if(oper == 161。) * param x */ private void getResult (double x){ if(oper == +){result += x。 161。//增加監(jiān)聽事件 } /** * 計算器的基礎(chǔ)操作( + 161。//在面板上增加按鈕 (color)。 } /** * 統(tǒng)一設(shè)置按鈕的的使用方式 * param panel * param name * param action * param color */ private void addButton(JPanel panel, String name, ActionListener action, 濟(jì)南大學(xué)課程設(shè)計 8 Color color){ JButton bt = new JButton(name)。//窗口不可改變大小 (500, 200)。 pack()。 (panel3, )。 (panel2, )。 addButton(panel3, M+, null, )。 addButton(panel3, MR, null, )。 (btns)。 (false)。 JButton btns = new JButton(計算器 )。 addButton(panel2, `, new Signs(), )。 addButton(panel2, π, numActionListener, )。 addButton(panel2, tan, new Signs(), )。 addButton(panel2, ., new Dot(), )。 addButton(panel2, 0, numActionListener, )。 addButton(panel2, cos, new Signs(), )。 addButton(panel2, 3, numActionListener, )。 addButton(panel2, 1, numActionListener, )。 addButton(panel2, sin, new Signs(), )。193。 addButton(panel2, 6, numActionListener, )。 addButton(panel2, 4, numActionListener, )。 addButt
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1