全国小学四则运算1.0

程序:全国小学四则运算1.0

源代码:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
//一开始的界面
public class Menu extends JFrame implements ActionListener{JButton enter;public Menu(){super("小学生四则运算大考验");setIconImage(Toolkit.getDefaultToolkit().getImage(Menu.class.getResource("/img/33.jpg")));this.setSize(578, 516);this.setLocation(350, 50);//主窗口位置this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(true);ImageIcon img=new ImageIcon(this.getClass().getResource("img/enterimg.png"));enter = new JButton("New button");enter.setIcon(img);getContentPane().add(enter, BorderLayout.CENTER);enter.addActionListener(this);this.setVisible(true);}public static void main(String[] args){new Menu();}@Overridepublic void actionPerformed(ActionEvent e) {if(e.getSource()==enter){this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);this.setVisible(false);Question question=new Question();}}
}
import java.awt.event.*;import javax.swing.*;
import javax.swing.border.LineBorder;import java.awt.*;
import java.math.*;
import java.text.*;
import java.util.regex.Pattern;
//输入题量的对话框 ,检查对话框,出题的界面,检查答案是否规范的对话框
public class Question extends JFrame implements ActionListener {public static String s[] = new String[5];static String tmnum;// 题目个数static int n;// 题目数量int[] num1 = new int[5];static int num2;// 阶乘的数static String[] useranser = new String[5];// 用户输入的答案static String[] staticanser = new String[5];// 标准答案static DecimalFormat decimal = new DecimalFormat("#.##");static JTextField[] textField = new JTextField[5];static JButton btnNewButton;static JButton button;static JButton hybutton;static JPanel panel;static JPanel p1;static Question q1;static int hycs = 1;Pattern pattern = Pattern.compile("[0-9]*");Question() {super("测试中......");setIconImage(Toolkit.getDefaultToolkit().getImage(Question.class.getResource("/img/33.jpg")));getContentPane().setBackground(new Color(255, 255, 0));setBackground(new Color(255, 255, 255));setForeground(new Color(255, 255, 255));this.setSize(499, 383);this.setLocation(350, 50);// 主窗口位置this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(true);tmnum = JOptionPane.showInputDialog("请输入题目个数(1~5):");do {if (pattern.matcher(tmnum).matches()) {// 如果输入的是数字就执行n = Integer.parseInt(tmnum);while (n <= 0 || n >= 6) {tmnum = JOptionPane.showInputDialog("输入错误!请重新输入题目个数(1~5):");n = Integer.parseInt(tmnum);}break;} else {tmnum = JOptionPane.showInputDialog("输入错误!请重新输入题目个数(1~5):");}} while (true);// 输入题目JLabel[] tm = new JLabel[5];p1 = new JPanel();p1.setForeground(new Color(0, 0, 0));p1.setBackground(new Color(253, 245, 230));getContentPane().add(p1, BorderLayout.CENTER);GridBagLayout gbl_p1 = new GridBagLayout();gbl_p1.columnWidths = new int[] { 0, 0, 0 };gbl_p1.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };gbl_p1.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };gbl_p1.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };p1.setLayout(gbl_p1);Question.timu(n, num1);JLabel label_5 = new JLabel("全国高等小学四则运算练习系统1.0");label_5.setFont(new Font("仿宋", Font.BOLD, 27));GridBagConstraints gbc_label_5 = new GridBagConstraints();gbc_label_5.gridwidth = 2;gbc_label_5.insets = new Insets(0, 0, 10, 0);gbc_label_5.gridx = 0;gbc_label_5.gridy = 0;p1.add(label_5, gbc_label_5);JLabel label = new JLabel(s[0]);// 第一题标签label.setBackground(new Color(144, 238, 144));label.setFont(new Font("Batang", Font.PLAIN, 24));label.setHorizontalAlignment(SwingConstants.LEFT);GridBagConstraints gbc_label = new GridBagConstraints();gbc_label.anchor = GridBagConstraints.SOUTH;gbc_label.fill = GridBagConstraints.HORIZONTAL;gbc_label.insets = new Insets(0, 20, 20, 0);gbc_label.gridx = 0;gbc_label.gridy = 1;// label
        p1.add(label, gbc_label);JLabel label_1 = new JLabel(s[1]);// 第二题标签label_1.setFont(new Font("Batang", Font.PLAIN, 24));label_1.setHorizontalAlignment(SwingConstants.LEFT);GridBagConstraints gbc_label_1 = new GridBagConstraints();gbc_label_1.fill = GridBagConstraints.HORIZONTAL;gbc_label_1.insets = new Insets(0, 20, 20, 0);gbc_label_1.gridx = 0;gbc_label_1.gridy = 2;p1.add(label_1, gbc_label_1);JLabel label_2 = new JLabel(s[2]);// 第三题标签label_2.setFont(new Font("Batang", Font.PLAIN, 24));label_2.setHorizontalAlignment(SwingConstants.LEFT);GridBagConstraints gbc_label_2 = new GridBagConstraints();gbc_label_2.fill = GridBagConstraints.HORIZONTAL;gbc_label_2.insets = new Insets(0, 20, 20, 0);gbc_label_2.gridx = 0;gbc_label_2.gridy = 3;p1.add(label_2, gbc_label_2);JLabel label_3 = new JLabel(s[3]);// 第四题标签label_3.setFont(new Font("Batang", Font.PLAIN, 24));label_3.setHorizontalAlignment(SwingConstants.LEFT);GridBagConstraints gbc_label_3 = new GridBagConstraints();gbc_label_3.fill = GridBagConstraints.HORIZONTAL;gbc_label_3.insets = new Insets(0, 20, 20, 0);gbc_label_3.gridx = 0;gbc_label_3.gridy = 4;p1.add(label_3, gbc_label_3);JLabel label_4 = new JLabel(s[4]);// 第5题标签label_4.setFont(new Font("Batang", Font.PLAIN, 24));label_4.setHorizontalAlignment(SwingConstants.LEFT);GridBagConstraints gbc_label_4 = new GridBagConstraints();gbc_label_4.insets = new Insets(0, 20, 20, 0);gbc_label_4.fill = GridBagConstraints.HORIZONTAL;gbc_label_4.gridx = 0;gbc_label_4.gridy = 5;p1.add(label_4, gbc_label_4);for (int j = 0; j < n; j++) {textField[j] = new JTextField(10);GridBagConstraints gbc_textField = new GridBagConstraints();gbc_textField.anchor = GridBagConstraints.SOUTH;gbc_textField.insets = new Insets(0, 0, 20, 10);gbc_textField.fill = GridBagConstraints.HORIZONTAL;gbc_textField.gridx = 1;gbc_textField.gridy = j + 1;textField[j].setColumns(10);p1.add(textField[j], gbc_textField);}panel = new JPanel();panel.setBackground(new Color(253, 245, 230));getContentPane().add(panel, BorderLayout.SOUTH);GridBagLayout gbl_panel = new GridBagLayout();gbl_panel.columnWidths = new int[] { 0, 0, 57, 57, 0 };gbl_panel.rowHeights = new int[] { 23, 0 };gbl_panel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0,Double.MIN_VALUE };gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };panel.setLayout(gbl_panel);btnNewButton = new JButton("提交");// 提交按钮btnNewButton.setBackground(new Color(255, 228, 225));GridBagConstraints gbc_btnNewButton = new GridBagConstraints();gbc_btnNewButton.anchor = GridBagConstraints.NORTHWEST;gbc_btnNewButton.insets = new Insets(0, 100, 20, 40);gbc_btnNewButton.gridx = 0;gbc_btnNewButton.gridy = 0;// btnNewButton.setEnabled(false);
        panel.add(btnNewButton, gbc_btnNewButton);button = new JButton("退出");// 退出按钮button.setBackground(new Color(250, 250, 210));GridBagConstraints gbc_button = new GridBagConstraints();gbc_button.insets = new Insets(0, 0, 20, 40);gbc_button.anchor = GridBagConstraints.NORTHWEST;gbc_button.gridx = 1;gbc_button.gridy = 0;panel.add(button, gbc_button);hybutton = new JButton("\u62A4\u773C\u6A21\u5F0F");hybutton.setBackground(new Color(152, 251, 152));GridBagConstraints gbc_hybutton = new GridBagConstraints();gbc_hybutton.anchor = GridBagConstraints.NORTHWEST;gbc_hybutton.insets = new Insets(0, 0, 0, 5);gbc_hybutton.gridx = 2;gbc_hybutton.gridy = 0;panel.add(hybutton, gbc_hybutton);btnNewButton.addActionListener(this);button.addActionListener(this);hybutton.addActionListener(this);this.setVisible(true);}public static void timu(int max, int[] num1) {// 题目int n;char[] op = { '+', '-', '*', '/' };int[] no = new int[4];int cs;// 正负参数int ccs;// 题型参数String str = new String();for (int i = 0; i < max; i++) {ccs = (int) (Math.random() * 2);s[i] = "(" + (i + 1) + ")";n = (int) (Math.random() * 4 + 2);// 2-5个操作数if (ccs == 0) {// 一般式子计算for (int j = 0; j < n; j++) {cs = (int) (Math.random() * 2);if (cs == 0)// 负数num1[j] = -(int) (Math.random() * 100);// 控制随机数数值else// 正数num1[j] = (int) (Math.random() * 100);// 控制随机数数值
                }for (int k = 0; k < n - 1; k++) {no[k] = (int) (Math.random() * 4);// 随机产生操作符if (no[k] == 3 && num1[k + 1] == 0) {do {num1[k + 1] = (int) (Math.random() * 100);// 如果除号后为0,则重新取数。} while (num1[k + 1] == 0);}}for (int h = 0; h < n; h++) {if (h != n - 1) {if (num1[h] < 0)str = str + "(" + String.valueOf(num1[h]) + ")"+ String.valueOf(op[no[h]]);elsestr = str + String.valueOf(num1[h])+ String.valueOf(op[no[h]]);} else {if (num1[h] < 0)str = str + "(" + String.valueOf(num1[h]) + ")=";elsestr = str + String.valueOf(num1[h]) + "=";}}s[i] = s[i] + str;str = new String();} else// 阶层式子计算
            {num2 = (int) (Math.random() * 11);s[i] = "(" + (i + 1) + ")" + String.valueOf(num2) + "!=";}if (ccs == 0) {int sign; // 累加运算时的符号float left, right;// 保存蹭结果
                decimal.setRoundingMode(RoundingMode.HALF_UP);// 计算标准答案left = 0;right = num1[0];sign = 1;for (int g = 0; g < n - 1; g++) {switch (op[no[g]]) {case '+':left = left + sign * right;sign = 1;right = num1[g + 1];break;case '-':left = left + sign * right;sign = -1;right = num1[g + 1];break;case '*':right = right * num1[g + 1];break;case '/':right = right / num1[g + 1];break;}}staticanser[i] = String.valueOf(decimal.format(left + sign* right));System.out.println((i + 1) + ":" + staticanser[i]);} else {int ann = 1;if (num2 == 0) {staticanser[i] = "1";} else {for (int o = 1; o <= num2; o++) {ann = ann * o;}staticanser[i] = String.valueOf(ann);}System.out.println((i + 1) + ":" + staticanser[i]);}}}public static void main(String[] args) {q1 = new Question();}@Overridepublic void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubif (e.getSource() == btnNewButton) // 提交按钮
        {for (int l = 0; l < n; l++) //获取文本框内容useranser[l] = textField[l].getText();int flag1=0;//检查用户输入是否符合范围,是否为数字for (int l = 0; l < n; l++) {if (!pattern.matcher(textField[l].getText()).matches())// 如果输入的是数字就执行flag1=1;}int flag = 0;//检查用户输入是否为空for (int l = 0; l < n; l++) {if (textField[l].getText().isEmpty()) flag = 1;}if (flag != 1&&flag1!=1)//符合条件
            {this.setDefaultCloseOperation(Question.HIDE_ON_CLOSE);this.setVisible(false);Total to = new Total();} else //为空,或者不是数字则提示错误
            {JOptionPane.showMessageDialog(q1, "未完成题目或答案无效,请继续答题!!", "错误信息",JOptionPane.ERROR_MESSAGE);}}if (e.getSource() == button)// 退出
        {System.exit(0);}if (e.getSource() == hybutton) {// 护眼模式p1.setBackground(new Color(204, 255, 153));panel.setBackground(new Color(204, 255, 153));hycs = 0;}}}
import javax.swing.JFrame;import java.awt.GridLayout;
import java.awt.GridBagLayout;import javax.swing.JLabel;import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Font;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;import javax.swing.JButton;
import java.awt.Toolkit;//统计的页面
public class Total extends JFrame implements ActionListener
{JLabel[] lable=new JLabel[5];JLabel[] lable1=new JLabel[5];JButton restart,quit;static Total to;int count=0;Total(){super("统计");setIconImage(Toolkit.getDefaultToolkit().getImage(Total.class.getResource("/img/33.jpg")));this.setSize(499, 383);this.setLocation(350, 50);//主窗口位置this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(true);getContentPane().setBackground(new Color(253, 245, 230));if(Question.hycs==0){getContentPane().setBackground(new Color(204, 255, 153));}Question.hycs=1;GridBagLayout gridBagLayout = new GridBagLayout();gridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0, 0};gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};getContentPane().setLayout(gridBagLayout);JLabel lblNewLabel_9 = new JLabel("分数统计");lblNewLabel_9.setFont(new Font("仿宋", Font.BOLD, 30));GridBagConstraints gbc_lblNewLabel_9 = new GridBagConstraints();gbc_lblNewLabel_9.gridwidth = 2;gbc_lblNewLabel_9.insets = new Insets(0, 0, 5, 5);gbc_lblNewLabel_9.gridx = 1;gbc_lblNewLabel_9.gridy = 0;getContentPane().add(lblNewLabel_9, gbc_lblNewLabel_9);JLabel label = new JLabel("总共:"+Question.tmnum);label.setFont(new Font("仿宋", Font.PLAIN, 20));GridBagConstraints gbc_label = new GridBagConstraints();gbc_label.fill = GridBagConstraints.HORIZONTAL;gbc_label.anchor = GridBagConstraints.WEST;gbc_label.insets = new Insets(0, 20, 5, 30);gbc_label.gridx = 1;gbc_label.gridy = 1;getContentPane().add(label, gbc_label);int cs[]=new int[2];for(int y=0;y<Question.n;y++){try {Double.parseDouble(Question.useranser[y]); //可以转换为整型;
                } catch (Exception g) {if(Question.useranser[y].equals(" ")){}else{String[] ss = new String[2];ss = Question.useranser[y].split("/");cs[0] = Integer.valueOf(ss[0]);cs[1] = Integer.valueOf(ss[1]);double answer = (double) cs[0] / (double)cs[1];Question.useranser[y]=Question.decimal.format(answer);}}if(Question.useranser[y].equalsIgnoreCase(Question.staticanser[y]))count++;}JLabel lblNewLabel = new JLabel("答对:"+String.valueOf(count)+"题");lblNewLabel.setFont(new Font("仿宋", Font.PLAIN, 20));GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();gbc_lblNewLabel.fill = GridBagConstraints.HORIZONTAL;gbc_lblNewLabel.anchor = GridBagConstraints.WEST;gbc_lblNewLabel.insets = new Insets(0, 20, 5, 30);gbc_lblNewLabel.gridx = 1;gbc_lblNewLabel.gridy = 2;getContentPane().add(lblNewLabel, gbc_lblNewLabel);JLabel lblNewLabel_1 = new JLabel("答错:"+String.valueOf(Question.n-count)+"题");lblNewLabel_1.setFont(new Font("仿宋", Font.PLAIN, 20));GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();gbc_lblNewLabel_1.fill = GridBagConstraints.HORIZONTAL;gbc_lblNewLabel_1.anchor = GridBagConstraints.WEST;gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 30);gbc_lblNewLabel_1.gridx = 2;gbc_lblNewLabel_1.gridy = 2;getContentPane().add(lblNewLabel_1, gbc_lblNewLabel_1);JLabel lblNewLabel_2 = new JLabel("正确率:"+String.valueOf(Question.decimal.format(((float) count / (float) Question.n) * 100))+"%");lblNewLabel_2.setFont(new Font("仿宋", Font.PLAIN, 20));GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);gbc_lblNewLabel_2.fill = GridBagConstraints.HORIZONTAL;gbc_lblNewLabel_2.anchor = GridBagConstraints.WEST;gbc_lblNewLabel_2.gridx = 2;gbc_lblNewLabel_2.gridy = 1;getContentPane().add(lblNewLabel_2, gbc_lblNewLabel_2);JLabel lblNewLabel_7 = new JLabel("用户答案:");lblNewLabel_7.setBackground(new Color(245, 255, 250));lblNewLabel_7.setFont(new Font("仿宋", Font.BOLD, 30));GridBagConstraints gbc_lblNewLabel_7 = new GridBagConstraints();gbc_lblNewLabel_7.gridwidth = 2;gbc_lblNewLabel_7.insets = new Insets(0, 0, 5, 5);gbc_lblNewLabel_7.gridx = 1;gbc_lblNewLabel_7.gridy = 3;getContentPane().add(lblNewLabel_7, gbc_lblNewLabel_7);for(int i=0;i<Question.n;i++){lable1[i] = new JLabel(Question.s[i]+Question.useranser[i]);lable1[i].setFont(new Font("仿宋", Font.PLAIN, 20));GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();gbc_lblNewLabel_3.anchor = GridBagConstraints.WEST;gbc_lblNewLabel_3.gridwidth = 2;gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);gbc_lblNewLabel_3.gridx = 1;gbc_lblNewLabel_3.gridy = i+4;getContentPane().add(lable1[i], gbc_lblNewLabel_3);}JLabel lblNewLabel_8 = new JLabel("参考答案:");lblNewLabel_8.setBackground(new Color(245, 255, 250));lblNewLabel_8.setFont(new Font("仿宋", Font.BOLD, 30));GridBagConstraints gbc_lblNewLabel_8 = new GridBagConstraints();gbc_lblNewLabel_8.gridwidth = 2;gbc_lblNewLabel_8.insets = new Insets(0, 0, 5, 0);gbc_lblNewLabel_8.gridx = 3;gbc_lblNewLabel_8.gridy = 3;getContentPane().add(lblNewLabel_8, gbc_lblNewLabel_8);for(int i=0;i<Question.n;i++){lable[i] = new JLabel("("+(i+1)+")"+Question.staticanser[i]);lable[i].setFont(new Font("仿宋", Font.PLAIN, 20));GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();gbc_lblNewLabel_3.anchor = GridBagConstraints.WEST;gbc_lblNewLabel_3.gridwidth = 2;gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);gbc_lblNewLabel_3.gridx = 3;gbc_lblNewLabel_3.gridy = i+4;getContentPane().add(lable[i], gbc_lblNewLabel_3);}restart = new JButton("重新开始");restart.setBackground(new Color(255, 255, 153));GridBagConstraints gbc_btnNewButton = new GridBagConstraints();gbc_btnNewButton.anchor = GridBagConstraints.WEST;gbc_btnNewButton.insets = new Insets(0, 0, 0, 5);gbc_btnNewButton.gridx = 2;gbc_btnNewButton.gridy = 9;getContentPane().add(restart, gbc_btnNewButton);restart.addActionListener(this);quit = new JButton("  \u9000\u51FA  ");quit.setBackground(new Color(255, 255, 153));GridBagConstraints gbc_btnNewButton_1 = new GridBagConstraints();gbc_btnNewButton_1.insets = new Insets(0, 0, 0, 5);gbc_btnNewButton_1.gridx = 3;gbc_btnNewButton_1.gridy = 9;getContentPane().add(quit, gbc_btnNewButton_1);quit.addActionListener(this);this.setVisible(true);}public static void main(String[] args) {to=new Total();}@Overridepublic void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubif(e.getSource()==restart){this.dispose();Menu m=new Menu();    }else if(e.getSource()==quit){System.exit(0);}}}

 

一、程序执行:

1、开始界面

 

2、提示输入题量(对话框)

输入1~5内的数字:会跳转到出题的界面

             如果输入1~5以外的数字:

    输入非数字:

 

3、出题界面,根据用户输入的题量出题

 

4、用户输入答案,如果没有做完就提交会弹出提示框要填完才能提交,输入的答案不是数字提交也会提示

 

5、统计结果界面(答对多少题,打错多少题,正确率,答案之类)

 

6、判断用户输入的答案,用户可以输入分数,也可以输入小数,并且支持四舍五入计算小数点后两位:

 

 

 

7、换肤模式,在出题框架里点击换肤模式会更换皮肤

 

 

 

  开发环境:Eclipse

      程序完成的方向:

  1. 程序可以出带括号的正整数四则运算,支持分数,除法保留两位小数,如:(1/3+1)*2 = 2.67,特别注意:这里是2.67而非2.66,或保持分数形式:8/3
  1. 可以出表达式里含有负整数(负整数最小不小于-100)的题目,且负数需要带括号,用户输入的结果不用带括号。如: 2*(-4) = -8
  2. 用户可以选择出题的个数(最多不能超过5个题目),答题结束可以显示用户答错的题目个数和答对的题目个数
  3. 程序可以出单个整数阶乘的题目:如:4!=24
  4. 程序可以设置皮肤功能,可以改变界面的颜色即可。

 

结对同伴:

 

姓名

学号

博客地址

冯美欣

201306114451

http://www.cnblogs.com/maxx/

林欢雯

201306114450

http://www.cnblogs.com/wzhz/

 

   正如书上说的,在结对编程里,没有我的代码,或你的代码,只有我们的代码,在这次的结对编程里面我跟我的同伴两人在领航员,驾驶员的角色中切换工作,在编程过程中存在激烈的讨论,遇到困难在网上收集资料解决难题。可以说程序里的每一个部分都是一起完成,因为我们在一起睡了几个晚上,哈~~~

总结:       

收获:在这次的结对编程里面,给我很不一样的感觉,感觉是一个小团队的感觉,之前的编程都是自己一个人完成比较多,很少有这种感觉,在于同伴一起完成,收获了以下几点:

1、无论做什么都要先理顺思路,要一个什么东西,基本框架是什么,每一个界面的大概模型,还有基本功能是什么,都要先考虑好才能动手,不然会很混乱;

2、在写代码的时候思路一定要清晰,就算遇到可恶的bug(八阿哥)也不能急,从错误的地方一条一条代码地检查,就很快你那个找错错误的地方;

3、发现自己界面方面的知识基础不行,要多点掌握或者去了解一下这些类有哪些方法属性,只有掌握好基础才能更好更灵活地写出更好地程序;

 

感悟:

    经过这次的结对练习,感觉团队是个好东西,他可以让每个人看到自己不足,也能让自己发现自身好的地方,而且在遇到关卡时不用一个人在那里抓狂,有一个人可以陪你一起激烈的讨论,不断的调试,把bug一个一个地解决掉,那种感觉真的倍爽!!

我会发现自己需要多点了解java,多点了解怎么实现一些小功能,保留两位,四舍五入,框架地属性之类地,要稳扎根基。

在弄这个结对练习这段时间真的好有冲劲,超享受的虽然弄出来的程序不是很完美,但是程序的代码我们一起打出来的,比完美的程序更珍贵~

 

工作图可以去看我的同伴的博客:

林欢雯:http://www.cnblogs.com/wzhz/

转载于:https://www.cnblogs.com/maxx/p/4408937.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/459497.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Chrome开发者工具详解

作为一名前端开发者&#xff0c;打交道最多的可能是和浏览器。市面上各种浏览器多不胜数&#xff0c;主流的有Chrome&#xff0c;Firefox&#xff0c;Safari&#xff0c;IE&#xff0c;Opera&#xff0c;非主流的如360&#xff0c;遨游&#xff0c;QQ浏览器&#xff0c;搜狗浏览…

redis学习笔记-安装与入门

Linux下安装redis mkdir /usr/local/redis && cd /usr/local/redis 下载&#xff1a;wget http://download.redis.io/releases/redis-3.0.5.tar.gz 解压&#xff1a;tar xzf redis-3.0.5.tar.gz 安装到指定目录&#xff1a; cd redis-3.0.5 make PREFIX/usr/local/red…

靠能力赚大钱,是最最可笑的谎言

很多人其实到现在也没弄明白他们是怎么赚钱的&#xff0c;很多人都会把自己成功归结为能力的结果&#xff0c;事实上这个是最大的可悲……靠能力赚钱&#xff0c;是一个弥天大谎&#xff01;我自己一直在反思这些年里的很多事情&#xff0c;突然发现所有的成功失败&#xff0c;…

WPF自定义控件与样式(1)-矢量字体图标(iconfont)

原文:WPF自定义控件与样式(1)-矢量字体图标(iconfont)一&#xff0e;图标字体 图标字体在网页开发上运用非常广泛&#xff0c;具体可以网络搜索了解&#xff0c;网页上的运用有很多例子&#xff0c;如Bootstrap。但在C/S程序中使用还不多&#xff0c;字体图标其实就是把矢量图…

css3 loading 效果1

代码&#xff1a; <!doctype html> <html lang"en"> <head> <meta charset"UTF-8"> <title>Document</title> <style> #box{position: relative;margin: 100px;} #box span{display: block;width: 9px;height: …

类成员函数解析

1、 构造函数&#xff1a; &#xff08;1&#xff09; 定义&#xff1a;是一个特殊的成员函数&#xff0c;名字与类名相同&#xff0c;创建类类型对象时&#xff0c;由编译器自动调用&#xff0c;在对象的生命周期内只且只调用一次&#xff0c;以保证每个数据成员都有一…

add-apt-repository cloud-archive:liberty

apt-get update && apt-get upgrade; v

C++ 继承解析

继承 1、概念&#xff1a; 继承(inheritance)机制是面向对象程序设计使代码可以复用的最重要的手段&#xff0c;它允许程序员在保持原有类特性的基础上进行扩展&#xff0c;增加功能。这样产生新的类&#xff0c;称派生类。继承呈现了面向对象程序设计的层次结构&#xff0c;体…

[傅里叶变换及其应用学习笔记] 九. 继续卷积的讨论

这份是本人的学习笔记&#xff0c;课程为网易公开课上的斯坦福大学公开课&#xff1a;傅里叶变换及其应用。 卷积在滤波中的应用 浑浊度&#xff08;Turbidity&#xff09;研究是关于测量水的清澈度的研究。大致方法是把光传感器放置到深水区域&#xff0c;然后测量光线的昏暗程…

C++多态相关关问题及虚表剖析

关于C多态的问题&#xff1a;&#xff08;基于Visual Studio 2012编译器&#xff09; 一、多态引入 1、对象的类型&#xff1a; &#xff08;1&#xff09; 静态的类型&#xff1a;对象声明时的类型&#xff0c;在编译的时候确定 &#xff08;2&#xff09; 动态的类型&…

C++调用约定

<div class"markdown_views"><p>有一定C开发经验的人一定对”__cdecl、__stdcall、__fastcall”肯定不陌生吧&#xff01;但你真正理解了吗&#xff1f;是的&#xff0c;我曾在这采了无数个坑&#xff0c;栽了无数个跟头&#xff0c;终于忍无可忍要把它总…

C++动态绑定及返回类型协变

C多态之动态绑定&#xff1a; 1、概念&#xff1a;在程序执行期间(非编译期)判断所引用对象的实际类型&#xff0c;根据其实际类型调用相应的方法。 使用virtual关键字修饰类的成员函数时&#xff0c;指明该函数为虚函数&#xff0c;派生类需要重新实现&#xff0c;编译器将实…

使用ucontext组件实现的coroutine代码分析

coroutine一般翻译过来就是协程&#xff0c;类似于线程可以切换&#xff0c;而跟线程是由操作系统调度器来实现切换不一样&#xff0c;协程由用户程序自己调度进行切换。我以前也看过协程相关的内容&#xff0c;但没有自己去实现过。最近搞OpenStack&#xff0c;OpenStack各个模…

C++模板剖析:函数模板、类模板解析

C中关于模板&泛型编程问题&#xff1a; 问题引入&#xff1a;何编写一个通用加法函数&#xff1f; &#xff08;1&#xff09;使用函数重载&#xff0c;针对每个所需相同行为的不同类型重新实现它 int Add(const int &_iLeft, const int&_iRight) { return (_iL…

Android Studio 1.1的安装和遇到的坑

Google的Android Studio 出1.0稳定版本也有很久的时间了&#xff0c;一直喜欢Jetbrains公司的IDE&#xff0c;不同语言的IDE操作习惯都比较统一。 而Android Studio 是基于IntelliJ IDEA的社区版开发的 &#xff0c;怎么也要尝尝鲜才行。 今天安装了下&#xff0c;被几个小坑卡…

BestCoder Round #39 解题报告

现场只做出前三题w 不过不管怎样这既是第一次认真打BC 又是第一次体验用在线编译器调代码 订正最后一题花了今天一整个下午&#xff08;呜呜 收获还是比较大的^_^ Delete wld有n个数(a1,a2,...,an)&#xff0c;他希望进行k次删除一个数的操作&#xff0c;使得最后剩下的n−k个数…

linux :vim 实现命令行下输出进度条

1、 进度条原理&#xff1a; 进度条的的动态增长是利用人的视觉短暂停留效果的&#xff0c;不断从输出缓冲区刷新出相同的内容&#xff0c;在肉眼看来进度条在不断的增长。 在显示器上先输出[# ][%1] 刷新一次之后&#xff0c; …

***jquery选择器 之 获取父级元素、同级元素、子元素

一、获取父级元素1、 parent([expr]): 获取指定元素的所有父级元素 <div id"par_div"><a id"href_fir" href"#">href_fir</a><a id"href_sec" href"#">href_sec</a><a id"href_thr&q…

Sql Server字符串函数

字符串函数用于对字符和二进制字符进行各种操作 1.ASCII()函数 ASCII(character_expression)函数用于返回字符串表达式中最左侧的ASCII代码值。参数character_expression必须是一个char或varchar类型的字符串表达式。 eg: select ASCII(s),ASCII(sql),ASCII(1);执行结果如图:字…

linux 编辑器vim配置

1、 基本配置 对vim进行配置的目的&#xff1a; 进行vim配置&#xff0c;可以让我们在后续敲代码更加方便。按F5可以直接编译并执行C、C代码以及执行shell脚本&#xff1b;按“F8”可进行C、C代码的调试&#xff1b;“Ctrl A”为全选并复制快捷键&#xff0c;方便复…