github地址 | https://github.com/226DEBABA/PairProgramming |
結對夥伴做業地址 | https://www.cnblogs.com/bookway/ |
說明:這次結對編程做業由付昶宇和黃本巍共同完成git
PSP2.1 | Personal Software Process Stages | 預估耗時 | 實際耗時 |
---|---|---|---|
Planning | 計劃 | 30 | 25 |
Estimate | 估計這個任務須要多少時間 | 800 | 900 |
Development | 開發 | 60 | 60 |
Analysis | 需求分析 | 60 | 90 |
Design Spec | 生成設計文檔 | 30 | 20 |
Design Review | 設計複審 | 10 | 15 |
Coding Standard | 代碼規範 | 15 | 15 |
Design | 具體設計 | 40 | 60 |
Coding | 具體編碼 | 120 | 150 |
Code Review | 代碼複審 | 60 | 60 |
Test | 測試 | 120 | 150 |
Reporting | 報告 | 120 | 120 |
Test Report | 測試報告 | 60 | 90 |
Size Measurement | 計算工做量 | 20 | 20 |
Postmortem & Process Improvement Plan | 過後總結, 並提出過程改進計劃 | 40 | 60 |
合計 | 785 | 935 |
1.設計思路
項目由C#語言完成,先創建模擬數據庫中的學生集合,再創建接口將學生信息從數據庫提取出來並實現點名功能。在原有基礎上設計了登錄的功能。
2.如何體現所列舉的原則
(1)Design By Contract: 在正確的輸入下才可以獲得輸出,不然程序報錯。
(2)Information Hiding: 使用C#中的Public和Private。
(3)Interface Design: 創建面向數據庫的接口,用以創建不一樣功能層之間的通訊,並對協定進行定義的引用類型。
(4)Loose Coupling : 保持各模塊的獨立性,高內聚低耦合。github
1.代碼規範
咱們學習了相關知識,具體參考連接:https://www.jianshu.com/p/d7e87107073c
2.代碼互審及合併
編程和創新設計是共同完成的,合併時按照代碼規範作了必定的修改,整體沒有發現什麼大的問題。數據庫
編程能力有限,代碼參照了老師賞賜的文件夾。自主學習了本次創新部分的內容以及單元測試。
編程
代碼:c#
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using DaoLayer; namespace UnitTestProject2 { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { DaoLayer.StudentDAO dao = new DaoLayer.StudentDAO(); Assert.AreEqual(dao.getStudentRecordsNums(), 84); } } }
創做了一個登陸界面。
代碼:ide
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WinformControlUse { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void label2_Click(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "黃本巍" && textBox2.Text == "123456") { this.Hide(); FrmStudent frmStudent = new FrmStudent(); frmStudent.Show(); } if (textBox1.Text == "付昶宇" && textBox2.Text == "123456") { this.Hide(); FrmStudent frmStudent = new FrmStudent(); frmStudent.Show(); } } } }
經過此次學習,我初步學會了如何建立窗體,以及運用窗體作出一份簡單的登陸界面。可是,最大的缺陷仍是在於徹底沒有寫代碼的靈感,只好運用老師所給的代碼,單元測試也是參考了其餘同窗的。從此得多多複習c#這一塊。爲團隊做業作準備。單元測試