zoukankan      html  css  js  c++  java
  • 结对编写四则运算

    小伙伴博客:http://home.cnblogs.com/u/gq291254350/

    小伙伴信息: 果强 学号130201207

    实现的功能:

    1、带有用户界面的C#窗体运用程序,并应用C#相关语句。

    2、实现加减乘除分开式运算界面,题目不重复。

    3、统计答题者的答题结果。

    4、加强随机性,支持负数。

    分工

    1、我负责代码的加减,并且负责相关的窗体界面,主界面由我们俩共同完成,并且有各种学霸鼎力相助!
    小伙伴 小伙伴负责乘除运算的代码和界面,由于题目相对于我们有点难度,所以有些参考了网上的东西,也感谢吴阿平同学,张富斌同学和百度同学的鼎力相助

    结对伙伴的优缺点总结:

      优点 缺点
    本人

    1、界面布局美化不错

    2、耐心

    3、代码规范

    1、对相关知识点掌握不足

    2、慢性子,做事不着急

    小伙伴

    1、比较开朗,善于发现不足

    2、善于利用现有资源完成任务

    3、善于提出问题,并快速寻求帮助,保证进程不拖沓。

    1、急性子

    2、代码有少许不规范,

    结对编程的优缺点总结:

    优点 缺点

    双人合作思路广泛,想法多,便于选出更好的方案

    编写程序出错能及时发现更改

    效率高

    意见有时候分歧大

    牺牲个人时间较多

    程序截图

         1、主界面

        

    接下来的是加减乘除四个界面:

    运行界面:

    部分主要程序展示

    namespace WindowsApplication2
    {
    partial class MainForm
    {
    /// <summary>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
    protected override void Dispose(bool disposing)
    {
    if (disposing && (components != null))
    {
    components.Dispose();
    }
    base.Dispose(disposing);
    }

    #region Windows 窗体设计器生成的代码

    /// <summary>
    /// 设计器支持所需的方法 - 不要
    /// 使用代码编辑器修改此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
    this.button1 = new System.Windows.Forms.Button();
    this.label1 = new System.Windows.Forms.Label();
    this.label2 = new System.Windows.Forms.Label();
    this.button2 = new System.Windows.Forms.Button();
    this.button3 = new System.Windows.Forms.Button();
    this.button4 = new System.Windows.Forms.Button();
    this.pictureBox5 = new System.Windows.Forms.PictureBox();
    ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
    this.SuspendLayout();
    //
    // button1
    //
    this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    | System.Windows.Forms.AnchorStyles.Left)
    | System.Windows.Forms.AnchorStyles.Right)));
    this.button1.Cursor = System.Windows.Forms.Cursors.Hand;
    this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    this.button1.ForeColor = System.Drawing.Color.Red;
    this.button1.Location = new System.Drawing.Point(65, 173);
    this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    this.button1.Name = "button1";
    this.button1.Size = new System.Drawing.Size(128, 47);
    this.button1.TabIndex = 0;
    this.button1.Text = "加法练习";
    this.button1.UseVisualStyleBackColor = true;
    this.button1.Click += new System.EventHandler(this.button1_Click);
    //
    // label1
    //
    this.label1.AutoSize = true;
    this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
    this.label1.Cursor = System.Windows.Forms.Cursors.No;
    this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
    this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    this.label1.ForeColor = System.Drawing.Color.Blue;
    this.label1.Location = new System.Drawing.Point(109, 84);
    this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    this.label1.Name = "label1";
    this.label1.Size = new System.Drawing.Size(296, 33);
    this.label1.TabIndex = 1;
    this.label1.Text = "简单的四则运算编题器";
    //
    // label2
    //
    this.label2.AutoSize = true;
    this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
    this.label2.Cursor = System.Windows.Forms.Cursors.No;
    this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    this.label2.ForeColor = System.Drawing.Color.Red;
    this.label2.Location = new System.Drawing.Point(101, 422);
    this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    this.label2.Name = "label2";
    this.label2.Size = new System.Drawing.Size(304, 31);
    this.label2.TabIndex = 2;
    this.label2.Text = "13级计科-2班 果强 黄泽平";
    //
    // button2
    //
    this.button2.Cursor = System.Windows.Forms.Cursors.Hand;
    this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    this.button2.ForeColor = System.Drawing.Color.DarkRed;
    this.button2.Location = new System.Drawing.Point(339, 173);
    this.button2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    this.button2.Name = "button2";
    this.button2.Size = new System.Drawing.Size(113, 47);
    this.button2.TabIndex = 3;
    this.button2.Text = "减法练习";
    this.button2.UseVisualStyleBackColor = true;
    this.button2.Click += new System.EventHandler(this.button2_Click);
    //
    // button3
    //
    this.button3.Cursor = System.Windows.Forms.Cursors.Hand;
    this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    this.button3.ForeColor = System.Drawing.Color.ForestGreen;
    this.button3.Location = new System.Drawing.Point(142, 294);
    this.button3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    this.button3.Name = "button3";
    this.button3.Size = new System.Drawing.Size(110, 51);
    this.button3.TabIndex = 4;
    this.button3.Text = "乘法练习";
    this.button3.UseVisualStyleBackColor = true;
    this.button3.Click += new System.EventHandler(this.button3_Click);
    //
    // button4
    //
    this.button4.Cursor = System.Windows.Forms.Cursors.Hand;
    this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    this.button4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
    this.button4.Location = new System.Drawing.Point(270, 294);
    this.button4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    this.button4.Name = "button4";
    this.button4.Size = new System.Drawing.Size(110, 51);
    this.button4.TabIndex = 5;
    this.button4.Text = "除法练习";
    this.button4.UseVisualStyleBackColor = true;
    this.button4.Click += new System.EventHandler(this.button4_Click);
    //
    // pictureBox5
    //
    this.pictureBox5.Location = new System.Drawing.Point(-2, -2);
    this.pictureBox5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    this.pictureBox5.Name = "pictureBox5";
    this.pictureBox5.Size = new System.Drawing.Size(521, 550);
    this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
    this.pictureBox5.TabIndex = 10;
    this.pictureBox5.TabStop = false;
    //
    // MainForm
    //
    this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    this.BackColor = System.Drawing.SystemColors.ButtonHighlight;
    this.ClientSize = new System.Drawing.Size(513, 549);
    this.Controls.Add(this.button4);
    this.Controls.Add(this.button3);
    this.Controls.Add(this.button2);
    this.Controls.Add(this.label2);
    this.Controls.Add(this.label1);
    this.Controls.Add(this.button1);
    this.Controls.Add(this.pictureBox5);
    this.ForeColor = System.Drawing.Color.Maroon;
    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
    this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    this.Name = "MainForm";
    this.Text = "小学生练习器";
    this.Load += new System.EventHandler(this.MainForm_Load);
    ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
    this.ResumeLayout(false);
    this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.Label label2;
    private System.Windows.Forms.Button button2;
    private System.Windows.Forms.Button button3;
    private System.Windows.Forms.Button button4;
    private System.Windows.Forms.PictureBox pictureBox5;
    }
    }

    我们的合作照片 :

      

  • 相关阅读:
    认识计算机
    Sum 类型题目总结
    3Sum Smaller 解答
    3Sum Closest 解答
    Roman to Integer && Integer to Roman 解答
    Longest Common Prefix 解答
    Shortest Word Distance 解答
    Longest Valid Parentheses 解答
    Lowest Common Ancestor of a Binary Search Tree 解答
    Longest Palindromic Substring 解答
  • 原文地址:https://www.cnblogs.com/hzp0/p/5360962.html
Copyright © 2011-2022 走看看