小夥伴部落格: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;
/// 清理所有正在使用的資源。
/// <param name="disposing">如果應釋放托管資源,為 true;否則為 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗體設計器生成的代碼
/// 設計器支援所需的方法 - 不要
/// 使用代碼編輯器修改此方法的内容。
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;
}
}
我們的合作照片 :