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

正文內(nèi)容

簡易計(jì)算器課程設(shè)計(jì)-wenkub

2023-01-28 16:02:16 本頁面
 

【正文】 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (c)。 (eight)。//C ()。 ce=new JButton(CE)。 ()。 (eight)。 (this)。 num9=new JButton(9)。 sin=new JButton(sin)。 num6=new JButton(6)。 num2=new JButton(2)。 kai = new JButton(sqrt)。 quyu = new JButton(%)。 jian = new JButton()。 (false)。 (false)。 (false)。 (false)。 (false)。 (new GridLayout(1,1))。 cp=getContentPane()。 ()。 public Calculator(){ super(計(jì)算器)。 int all=0。 Container cp。  JMenuItem fileMenu,exitItemOfFile,s,t, about, me。import 。** 繼承的父類: JFrame類 ** 實(shí)現(xiàn)的接口:ActionListener類 ************************************************************ 類名: WindowDestroyer ** 作用: 退出窗口動(dòng)作。    事件監(jiān)聽器中的事件處理方法void actionPerformed(ActionEvent event)完成主要的按鈕事件的處理。十進(jìn)制與二進(jìn)制、八進(jìn)制、十六進(jìn)制之間的轉(zhuǎn)換。三、需求分析日常生活中經(jīng)常需要用到計(jì)算器,比如科學(xué)計(jì)算、數(shù)值計(jì)算、會(huì)計(jì)業(yè)務(wù)等,但簡單的計(jì)算器已不能滿足日常需要,因此有必要開發(fā)一些進(jìn)制轉(zhuǎn)換、開方等多種運(yùn)算的計(jì)算器。 在我的計(jì)算器上實(shí)現(xiàn)了以上功能。目錄一、運(yùn)行環(huán)境5二、問題描述及要求21八、源代碼在菜單欄有查看、編輯、幫助菜單,在“查看”菜單中有“標(biāo)準(zhǔn)型”菜單項(xiàng),實(shí)現(xiàn)加減乘除等基本功能,“科學(xué)型”菜單項(xiàng),實(shí)現(xiàn)進(jìn)制間的轉(zhuǎn)換。創(chuàng)建一個(gè)簡單計(jì)算器,具有簡單的人機(jī)交互界面,便于數(shù)據(jù)計(jì)算。菜單中包含的一些功能,如幫助文檔。事件分為以下幾種情況:數(shù)字按鈕事件(0~9)、運(yùn)算符按鈕事件(+、-、/、%)、正負(fù)號(hào)按鈕事件(+/-)、小數(shù)點(diǎn)按鈕事件(.)、等號(hào)按鈕事件(=)、求倒按鈕事件(1/x)、三角函數(shù)按鈕事件(cos,sin,tan)、開方按鈕事件(sqrt)、對(duì)數(shù)按鈕事件(lgX,lnX)、進(jìn)制轉(zhuǎn)換按鈕事件。 ** 繼承的父類: WindowAdapter類 ** 實(shí)現(xiàn)的接口:無 ************************************************************ 類名: objConversion ** 作用: 各個(gè)進(jìn)制之間的轉(zhuǎn)換。import .*?!RadioButton sixteen,ten,eight,two。//容器,便于集體操作 JTextField text。 double qian。 setSize(400,400)。//從左到右 JPanel cp1=new JPanel()。 (cp1,North)。 (new GridLayout(2,4))。 ten=new JRadioButton(進(jìn)制,true)。 two=new JRadioButton(二進(jìn)制)。 b = new JButton(B)。 dd = new JButton(D)。 ff = new JButton(F)。 cheng = new JButton()。 deng = new JButton(=)。 dao = new JButton(1/x)。 num3=new JButton(3)。 num7=new JButton(7)。 tan=new JButton(tan)。 (this)。 ButtonGroup btg=new ButtonGroup()。 (two)。 Back=new JButton(Back)。//CE ()。 (this)。 (two)。 (num7)。 (num9)。 (kai)。 (num5)。 (cheng)。 (num1)。 (num3)。 (dao)。 (fu)。 (jia)。 (cos)。 (tan)。 (lgX)。 ()。 ()。 ()。 ()。 ()。 ()。 JMenu editMenu = new JMenu(編輯)。 (editMenu)。 (this)。 t = new JMenuItem(●標(biāo)準(zhǔn)型)。 (this)。    (about)。 addWindowListener(new WindowDestroyer())。  (false)。  (2. 單擊“+”執(zhí)行加、“”執(zhí)行減、“*”執(zhí)行乘或“/”執(zhí)行除+\n)。+\n)。 fuhao = +。 clear = false。 } if(temp==chu){ qian = (())。 fuhao=%。 if (fuhao == +) (qian + ss + )。) (qian / ss + )。 } if(temp==sin){((((())*)))。 }4、開方、求倒運(yùn)算if (temp == kai){ String s = ()。 else ((((()))))。 amp。 int i, j, k。 i++) if ((i) == 39。 j ()。 break。 k++) stemp += (k)。 } 5、正負(fù)號(hào)運(yùn)算if (temp == fu){ boolean isNumber = true。 i++) if(!((i)=39。(i)=39。||(i)==39。 } if (isNumber == true){ if ((0) == 39。 i ()。39。 for (int i = ()。 } public String decHex (int decNum){//10 to 16 String strHexNum = 。 } else{ currentNum = decNum。 case 14: strHexNum += E。 case 12: strHexNum += C。 case 10: strHexNum += A。 } } return invert(strHexNum,2)。 }else{ strOctNum += (decNum)。 while (decNum != 0) { if (decNum 1){ strBinNum += (decNum % 2)。 } } return invert (strBinNum, 8)。padding0。i) answer+=(i1)。本次的Java課程設(shè)計(jì)讓我對(duì)Java的理論知識(shí)又有了更深一步的了解,溫故而知新,開始設(shè)計(jì)時(shí)完全沒頭緒,感覺很混亂,對(duì)書本知識(shí)不夠扎實(shí)的我深感“書到用時(shí)方恨少”,只好又一遍瀏覽全書,讓我對(duì)其有了大概的復(fù)習(xí),對(duì)知識(shí)系統(tǒng)全面進(jìn)行了了解,讓我里出了我設(shè)計(jì)的框架,遇到困難時(shí)先是苦思冥想在向同學(xué)請(qǐng)教。因此在以后的學(xué)習(xí)中我會(huì)通過實(shí)踐來檢驗(yàn)自己的不足和加深、鞏固自身。由于專業(yè)知識(shí)有限,以及動(dòng)手能力的欠缺,所以開發(fā)的系統(tǒng)不是很完善,有一些功能未實(shí)現(xiàn),但是簡易計(jì)算器的基本功能均已實(shí)現(xiàn)。import 。//各個(gè)進(jìn)制之間的轉(zhuǎn)化 JMenuItem fileMenu,exitItemOfFile,s,t, about, me。 Container cp。 int all=0。 public Calculator(){ super(計(jì)算器)。 ()。 cp=getContentPane()。 (new GridLayout(1,1))。 (false)。 (false)。 (false)。 (false)。 (false)。 jian = new JButton()。 quyu = new JButton(%)。 kai = new JButton(sqrt)。 num2=new JButton(2)。 num6=new JButton(6)。 sin=new JButton(sin)。 num9=new JButton(9)。 (this)。 (eight)。 ()。 ce=new JButton(CE)。//C ()。 (eight)。 (c)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 ()。 ()。 ()。 ()。 ()。 ()。 setJMenuBar(mainMenu)。 (viewMenu)。 exitItemOfFile = new JMenuItem(粘貼V Ctrl+V)。 (exitItemOfFile)。 (s)。 me = new JMenuItem( 幫助主題)。 (執(zhí)行簡
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1