diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..1f014b5
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..5430172
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 6422026..0000000
--- a/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# xzy
-
diff --git a/UML.iml b/UML.iml
new file mode 100644
index 0000000..c90834f
--- /dev/null
+++ b/UML.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/UML/Main.class b/out/production/UML/Main.class
new file mode 100644
index 0000000..78ba6c1
Binary files /dev/null and b/out/production/UML/Main.class differ
diff --git a/src/Computer.java b/src/Computer.java
new file mode 100644
index 0000000..6ebb92c
--- /dev/null
+++ b/src/Computer.java
@@ -0,0 +1,148 @@
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+public class Computer extends JFrame{
+ private static final long serialVersionUID = 1L;
+ JPanel xs, aj;
+ JTextField xsArea;
+ JButton[] aJButtons = new JButton[16];
+ String a;
+ int flag = 0;
+ public static void main(String[] args) {
+ Computer t = new Computer();
+ }
+ public Computer() {
+ this.setTitle("计算器");
+ Container c = getContentPane();
+ c.setLayout(new BorderLayout());
+ xs = new JPanel(new FlowLayout());
+ xsArea = new JTextField(20);
+ xsArea.setFont(new Font("宋体", Font.PLAIN, 38));
+ xs.add(xsArea);
+ c.add(xs, BorderLayout.NORTH);
+ aj = new JPanel(new GridLayout(4,4));
+ aJButtons[0]=new JButton("0");
+ aJButtons[1]=new JButton("1");
+ aJButtons[2]=new JButton("2");
+ aJButtons[3]=new JButton("3");
+ aJButtons[4]=new JButton("4");
+ aJButtons[5]=new JButton("5");
+ aJButtons[6]=new JButton("6");
+ aJButtons[7]=new JButton("7");
+ aJButtons[8]=new JButton("8");
+ aJButtons[9]=new JButton("9");
+ aJButtons[10]=new JButton("+");
+ aJButtons[11]=new JButton("-");
+ aJButtons[12]=new JButton("*");
+ aJButtons[13]=new JButton("/");
+ aJButtons[14]=new JButton("=");
+ aJButtons[15]=new JButton(".");
+ aj.add(aJButtons[7]);
+ aj.add(aJButtons[8]);
+ aj.add(aJButtons[9]);
+ aj.add(aJButtons[13]);
+ aj.add(aJButtons[4]);
+ aj.add(aJButtons[5]);
+ aj.add(aJButtons[6]);
+ aj.add(aJButtons[12]);
+ aj.add(aJButtons[1]);
+ aj.add(aJButtons[2]);
+ aj.add(aJButtons[3]);
+ aj.add(aJButtons[11]);
+ aj.add(aJButtons[0]);
+ aj.add(aJButtons[15]);
+ aj.add(aJButtons[10]);
+ aj.add(aJButtons[14]);
+ c.add(aj, BorderLayout.CENTER);
+ setSize(400, 400);
+ setVisible(true);
+ for(int i = 0; i < 10; i++) {
+ final String o = aJButtons[i].getActionCommand();
+ aJButtons[i].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a = xsArea.getText();
+ a = a + o;
+ xsArea.setText(a);
+ }
+ });
+
+ }
+
+ aJButtons[10].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a = xsArea.getText();
+ a = a + "+";
+ flag = 1;//加法
+ xsArea.setText(a);
+ }
+ });
+
+ aJButtons[11].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a = xsArea.getText();
+ a = a + "-";
+ flag = 2;//减法
+ xsArea.setText(a);
+ }
+ });
+
+ aJButtons[12].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a=xsArea.getText();
+ a=a+"*";
+ flag=3;//乘法
+ xsArea.setText(a);
+ }
+ });
+
+ aJButtons[13].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a=xsArea.getText();
+ a=a+"/";
+ flag=4;//除法
+ xsArea.setText(a);
+ }
+ });
+
+ aJButtons[14].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a = xsArea.getText();
+ String[] sz = new String[2];
+ sz=a.split("\\+|\\-|\\*|\\/");
+ double b = 0;
+ if(flag == 0) {
+ b = Double.parseDouble(a);
+ }
+
+ else if(flag == 1) {
+ b = Double.parseDouble(sz[0]) + Double.parseDouble(sz[1]);
+ }
+
+ else if(flag == 2) {
+ b = Double.parseDouble(sz[0]) - Double.parseDouble(sz[1]);
+ }
+
+ else if(flag == 3) {
+ b = Double.parseDouble(sz[0]) * Double.parseDouble(sz[1]);
+ }
+
+ else if(flag == 4) {
+ b = Double.parseDouble(sz[0]) / Double.parseDouble(sz[1]);
+ }
+
+ a = ""+b;
+ xsArea.setText(a);
+ }
+ });
+
+ aJButtons[15].addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ a=xsArea.getText();
+ a=a+".";
+ xsArea.setText(a);
+ }
+ });
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/Main.java b/src/Main.java
new file mode 100644
index 0000000..fe7aa2b
--- /dev/null
+++ b/src/Main.java
@@ -0,0 +1,15 @@
+//TIP 要运行代码,请按 或
+// 点击装订区域中的 图标。
+public class Main {
+ public static void main(String[] args) {
+ //TIP 当文本光标位于高亮显示的文本处时按
+ // 查看 IntelliJ IDEA 建议如何修正。
+ System.out.printf("Hello and welcome!");
+
+ for (int i = 1; i <= 5; i++) {
+ //TIP 按 开始调试代码。我们已经设置了一个 断点
+ // 但您始终可以通过按 添加更多断点。
+ System.out.println("i = " + i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/新建 DOC 文档.doc b/新建 DOC 文档.doc
new file mode 100644
index 0000000..c328d7a
Binary files /dev/null and b/新建 DOC 文档.doc differ