Lobooi pair job (24235 + 24229)

Results team work
GitHub project address https://github.com/Lobooi/PairProgramming.git
Partner blog address https://www.cnblogs.com/lanti/p/11615583.html
Address operational requirements https://www.cnblogs.com/cherish599/p/11577268.html

1. PSP is expected to table:

See small partners blog friends - Fu Weixin's blog (24 229 twinning operations)

2. project design and coding

2.1 Partnership Division

It Jiwu 201 731 024 235: The main design and write the UI code, GitHub operation, the auxiliary unit testing and review.
Fu Weixin 201 731 024 229: assist with writing code, writing unit tests, finishing the preparation of the blog.
It is not strictly true division of labor, where both of them help each other and exchange (in order to avoid disagreement on the issue of code that implements the two appear).

2.2 Ideas and Implementation

Project ideas: on the basis of teacher education on the realization of the project team knot personalized features and functionality, first redesign of the UI interface, as well as the design of our own functional modules, is expected to design a total of five classes (including data collection, function set etc.).
Code implementation: The main teacher code analysis and improvement, and then add their own features:
1. redesigned UI: the controls are on the right layout settings, and determine the minimum display range, so can not find the program be scaled back window .
The main form
Records show form
2. The implementation code: First ensure the realization of our basic functions, and the problem does not occur, and secondly, in the realization of our own add new information to the data set (optimize student number and add a student gender):
Data Optimized
Then, is we own realization of the newly added features , to achieve the students were named to be recorded and can be displayed in a new window, it is intended to facilitate viewing and statistics named cases (provide a basis for rewards and punishments), but please be careful not to accidentally point to delete data. The following is a specific implementation, but instead of calling, and after we optimized the code window, avoiding the operator repeated the record open our window.

public class DianMingRecord
    {
        public string[] recordData = new string[100];
        int i = 0;

        public void DMrecord(string stuName) 
        {
            recordData[i] = stuName;
            i++;
        }

        public string ShowRecord()
        {
            string data = null;
            for(int j = 0 ;j <= i; j++)
            {
                data += recordData[j];
                data += "\r";
            }
            return data;
        }
    }

Introduce and optimize the form, mainly to control its after opening, can not be repeated again open, multiple windows to avoid redundancy.

    public partial class ShowRecordData : Form
    {
        string data = null;
        public ShowRecordData(string data)
        {
            InitializeComponent();
            this.data = data;
        }

        private void ShowRecordData_Load(object sender, EventArgs e)
        {
           lblRCdata.Text = data;
        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            data = null;
            lblRCdata.Text = data;
            DialogResult = DialogResult.OK;
            btnClear.Enabled = false;
        }
    }

这样就差不多完成了我们的点名项目具体实现。
设计原则主要体现了两种,一是:Information Hiding(信息隐藏): 信息隐藏指在设计和确定模块时,使得一个模块内包含的特定信息(过程或数据),对于不需要这些信息的其他模块来说,是不可访问的。 如何实现:信息隐藏就是对信息的封装,设置访问权限public、protect private等 ;二是:Design By Contract(契约式设计): 契约式设计就是按照某种规定对一些数据等做出约定,如果超出约定,程序将不再运行 如何体现:在输入数据情况下,能得到与预期一样的结果。此外还有合理利用封装与继承的思想对代码的结构进行了优化(尽管最后并没有具体使用继承类以及方法,因为使用会出现一定问题,考虑好后就没用使用)。

2.3代码的审查与单元测试

代码的审查: 主要是对程序错误的修改与处理,主要由24235(我,何继武)负责,但是还并不会有单元测试,它将会在我进行完代码的审查后进行。
单元测试: 这里主要由24229(傅伟鑫)负责,这里给出他的博客——傅伟鑫的博客(24229结对作业),让他来介绍。

3.结队总结

3.1结队过程

从设计交流到功能代码编写以及单元测试完成,我和我的伙伴之间进行了多次交流,好的是我们是室友所以交流起来比较方便,另外我们还花了很多时间来继续研究GitHub的使用,我们发现这个还是挺让人摸不着头脑的,下面给出两个靓仔的认真图,哈哈哈哈。
Handsome refueling

3.2 结果PSP表

还是他在弄哈,这里再次附上他的博客:傅伟鑫的博客(24229结对作业)

3.3结对总结

In fact, the most most important is that they learn how to use GitHub, and the use GitHub to manage code, we tried the branch and merge, without conflict, very smooth, and secondly there is the make their programming capabilities have been consolidated, grasp the use of the C # language in continuous learning and review of.
GitHub branch
We are not afraid of wasting time, it can cause us to continue to progress, come on! ! ! ! !

Guess you like

Origin www.cnblogs.com/lobooi/p/11615538.html