From 0ebaba733a5e586e7bff78dfff0a30527ac882e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E4=BD=B3=E6=9D=B0?= <1093155985@qq.com> Date: Sun, 9 Aug 2020 12:15:48 +0800 Subject: [PATCH] . --- 计算器窗体/.classpath | 10 - 计算器窗体/.project | 17 -- .../.settings/org.eclipse.jdt.core.prefs | 14 -- 计算器窗体/bin/Calculate.class | Bin 1355 -> 0 bytes 计算器窗体/bin/Calculater.class | Bin 5279 -> 0 bytes 计算器窗体/bin/Call.class | Bin 1035 -> 0 bytes 计算器窗体/src/Calculate.java | 31 --- 计算器窗体/src/Calculater.java | 205 ------------------ 计算器窗体/src/Call.java | 41 ---- 9 files changed, 318 deletions(-) delete mode 100644 计算器窗体/.classpath delete mode 100644 计算器窗体/.project delete mode 100644 计算器窗体/.settings/org.eclipse.jdt.core.prefs delete mode 100644 计算器窗体/bin/Calculate.class delete mode 100644 计算器窗体/bin/Calculater.class delete mode 100644 计算器窗体/bin/Call.class delete mode 100644 计算器窗体/src/Calculate.java delete mode 100644 计算器窗体/src/Calculater.java delete mode 100644 计算器窗体/src/Call.java diff --git a/计算器窗体/.classpath b/计算器窗体/.classpath deleted file mode 100644 index c0f260f..0000000 --- a/计算器窗体/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/计算器窗体/.project b/计算器窗体/.project deleted file mode 100644 index eed7e2c..0000000 --- a/计算器窗体/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - 计算器窗体 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/计算器窗体/.settings/org.eclipse.jdt.core.prefs b/计算器窗体/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 71f736f..0000000 --- a/计算器窗体/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=12 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=12 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=12 diff --git a/计算器窗体/bin/Calculate.class b/计算器窗体/bin/Calculate.class deleted file mode 100644 index 26a3cd8059aa37052057da24b54a5aaa00511647..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1355 zcmZ`(-*4Mg7(F+&a}(F?+O%%E4F(+rl9eosm9o-pY&aAGO}b<7(1(5#5;=hr3x4P=c3T@>yy|QOo(dDWPO#?0zS=(qwPefh2=p&JDTT2!_JV*_ zdOB^nCNZLtIYD5cfPMpG7?&s>EB>%X6DM(sk(0>Ya^mZ8?A#@@R9?69cm`)Ao;^;w z+ey5ZiRbVDPY0Vipi%E$W1V&O>j=N2~h?fLpTQP!AWvrLi zRIMcwWt%I zeWi-5)l~6k@wN#YH6m%Vs;k;ztMew_#d`w9)!1)FVbtFi)cd6FIUtGBz0hNWqnGx7&i zDwgEI>YKTfxgIXgmLjhd%ZRe1uW1I_1f-cgaq3{Or^RW?&Nim?Clnr! zK4c{tx%aVxRi0gE)*Hkmvz@^jxjE)6;$vcYW*WmMsrLc%+@zJmr_48j>;X&8N(hND aiGsws;4};u|KVR+`ESw$KI6d*KK~D@-2`9& diff --git a/计算器窗体/bin/Calculater.class b/计算器窗体/bin/Calculater.class deleted file mode 100644 index 1e626738338655fcfed4cf53ca89b522d9c2ee7d..0000000000000000000000000000000000000000 GIT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Q1UhfYOT9?bYPB7{ zFXVV7h#C-3W zacUcGOLkXu6lFKmvR&!dbgT!x=>_K-IyQseH(auv7*3mSiywLIrfKcjl4MN6T9H>_ z7G&aY2BywwL|CKjiu@|sUHpu}Ph1Qj&MLLV-g zh|q|oK9>1iC4LZ_#82XWI`i_flg^w1aXa_`N_ zfO(WdDJqTsqn4nmsA=>v5kxt}J9AuxC@_y(eSsZL3~)}*kb6M{7Q8F|UZ&}QccM4< z_Z51epvaa(zR&iaGh(-t?P7619YnmwUJ^HnEYTw72%jkAyIAh9tV+4_f2h->o1wrg smT7t&3%Ey;t58cpfMi06vCDr<7#p-G&y-MO(0(Bol2{e5N^V=3;i--) { - String s = String.valueOf(cs[i]); - int b = Integer.parseInt(s); - Temp = Temp + Math.pow(10,a-1-i)*b; - } - System.out.print(Temp); - return call.Trigonometric_Functions(cs[0], Temp); - } - else { - int num1 = Integer.parseInt(String.valueOf(cs[0])); - int num2 = Integer.parseInt(String.valueOf(cs[2])); - return call.jjcc(num1, num2, cs[1]); - } - } -} diff --git a/计算器窗体/src/Calculater.java b/计算器窗体/src/Calculater.java deleted file mode 100644 index 6346d11..0000000 --- a/计算器窗体/src/Calculater.java +++ /dev/null @@ -1,205 +0,0 @@ -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; - -public class Calculater extends JFrame implements ActionListener { - private JPanel jPanel; - private JPanel jPanel1; - private Button button[] = new Button[24]; - private TextField TF; - private String st = ""; - private JScrollPane jscrollPane; - private JLabel label; - - public void Define() { - JFrame jFrame = new JFrame("¼ÆËãÆ÷"); - Container pane = jFrame.getContentPane(); - this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - jPanel = new JPanel(new GridLayout(6,4,5,5)); - jPanel1 = new JPanel(new GridLayout(2,1,5,5)); - TF = new TextField(st); - button[0] = new Button("sin"); - button[0].addActionListener(this); - button[1] = new Button("cos"); - button[1].addActionListener(this); - button[2] = new Button("tan"); - button[2].addActionListener(this); - button[3] = new Button("e^x"); - button[3].addActionListener(this); - button[4] = new Button("c"); - button[4].addActionListener(this); - button[5] = new Button("¡Â"); - button[5].addActionListener(this); - button[6] = new Button("¡Á"); - button[6].addActionListener(this); - button[7] = new Button("<-"); - button[7].addActionListener(this); - button[8] = new Button("7"); - button[8].addActionListener(this); - button[9] = new Button("8"); - button[9].addActionListener(this); - button[10] = new Button("9"); - button[10].addActionListener(this); - button[11] = new Button("-"); - button[11].addActionListener(this); - button[12] = new Button("4"); - button[12].addActionListener(this); - button[13] = new Button("5"); - button[13].addActionListener(this); - button[14] = new Button("6"); - button[14].addActionListener(this); - button[15] = new Button("+"); - button[15].addActionListener(this); - button[16] = new Button("1"); - button[16].addActionListener(this); - button[17] = new Button("2"); - button[17].addActionListener(this); - button[18] = new Button("3"); - button[18].addActionListener(this); - button[19] = new Button("log"); - button[19].addActionListener(this); - button[20] = new Button("%"); - button[20].addActionListener(this); - button[21] = new Button("0"); - button[21].addActionListener(this); - button[22] = new Button("."); - button[22].addActionListener(this); - button[23] = new Button("="); - button[23].addActionListener(this); - jPanel.add(button[0]); - jPanel.add(button[1]); - jPanel.add(button[2]); - jPanel.add(button[3]); - jPanel.add(button[4]); - jPanel.add(button[5]); - jPanel.add(button[6]); - jPanel.add(button[7]); - jPanel.add(button[8]); - jPanel.add(button[9]); - jPanel.add(button[10]); - jPanel.add(button[11]); - jPanel.add(button[12]); - jPanel.add(button[13]); - jPanel.add(button[14]); - jPanel.add(button[15]); - jPanel.add(button[16]); - jPanel.add(button[17]); - jPanel.add(button[18]); - jPanel.add(button[19]); - jPanel.add(button[20]); - jPanel.add(button[21]); - jPanel.add(button[22]); - jPanel.add(button[23]); - jPanel1.add(TF); - jPanel1.add(jPanel); - jscrollPane = new JScrollPane(label,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); - pane.add(jPanel1,BorderLayout.WEST); - pane.add(jscrollPane,BorderLayout.EAST); - jFrame.pack(); - jFrame.setVisible(true); - } - - @Override - public void actionPerformed(ActionEvent e) { - // TODO Auto-generated method stub - if(e.getActionCommand() == "0") { - st = st + "0"; - this.TF.setText(st); - } - if(e.getActionCommand() == "1") { - st = st + "1"; - this.TF.setText(st); - } - if(e.getActionCommand() == "2") { - st = st + "2"; - this.TF.setText(st); - } - if(e.getActionCommand() == "3") { - st = st + "3"; - this.TF.setText(st); - } - if(e.getActionCommand() == "4") { - st = st + "4"; - this.TF.setText(st); - } - if(e.getActionCommand() == "5") { - st = st + "5"; - this.TF.setText(st); - } - if(e.getActionCommand() == "6") { - st = st + "6"; - this.TF.setText(st); - } - if(e.getActionCommand() == "7") { - st = st + "7"; - this.TF.setText(st); - } - if(e.getActionCommand() == "8") { - st = st + "8"; - this.TF.setText(st); - } - if(e.getActionCommand() == "9") { - st = st + "9"; - this.TF.setText(st); - } - if(e.getActionCommand() == ".") { - st = st + "."; - this.TF.setText(st); - } - if(e.getActionCommand() == "+") { - st = st + "+"; - this.TF.setText(st); - } - if(e.getActionCommand() == "-") { - st = st + "-"; - this.TF.setText(st); - } - if(e.getActionCommand() == "¡Á") { - st = st + "¡Á"; - this.TF.setText(st); - } - if(e.getActionCommand() == "¡Â") { - st = st + "¡Â"; - this.TF.setText(st); - } - if(e.getActionCommand() == "sin") { - st = st + "sin"; - this.TF.setText(st); - } - if(e.getActionCommand() == "cos") { - st = st + "cos"; - this.TF.setText(st); - } - if(e.getActionCommand() == "tan") { - st = st + "tan"; - this.TF.setText(st); - } - if(e.getActionCommand() == "%") { - st = st + "%"; - this.TF.setText(st); - } - if(e.getActionCommand() == "e^x") { - st = st + "e^"; - this.TF.setText(st); - } - if(e.getActionCommand() == "log") { - st = st + "log"; - this.TF.setText(st); - } - if(e.getActionCommand() == "c") { - st = ""; - this.TF.setText(st); - } - if(e.getActionCommand() == "=") { - Calculate CA = new Calculate(); - double a = CA.CL(st); - st = String.valueOf((int)a); - this.TF.setText(st); - } - } - - public static void main(String arg[]) { - Calculater A = new Calculater(); - A.Define(); - } -} diff --git a/计算器窗体/src/Call.java b/计算器窗体/src/Call.java deleted file mode 100644 index 1052884..0000000 --- a/计算器窗体/src/Call.java +++ /dev/null @@ -1,41 +0,0 @@ -public class Call { - static double jjcc(int a, int b,char chose) { - switch(chose) { - case '+': - return a+b; - case '-': - return a-b; - case '¡Á': - return a*b; - case '¡Â': - return a/b; - } - return 0; - } - - static double e(int x) { - double e=Math.E; - double result; - - result=Math.pow(e,x); - return result; - - } - - static double log(int a, int x) { - return Math.log(x)/Math.log(a); - } - - static double Trigonometric_Functions(char chose,double Value) { - double a = Math.toRadians(Value); - switch(chose) { - case 's': - return Math.sin(a); - case 'c': - return Math.cos(a); - case 't': - return Math.tan(a); - } - return 0; - } -} \ No newline at end of file