Personal third job - Pair Programming

Fork repository Github project address project address
Student ID tail number 24218
Partners work address

A, PSP table

PSP2.1 Personal Software Process Stages Estimated time consuming (minutes) The actual time-consuming (minutes)
Planning plan 60 60
Estimate Estimate how much time this task requires 30 30
Development Develop 600 300
Analysis Needs analysis (including learning new technologies) 600 360
Design Spec Generate design documents 120 120
Design Review Design review (and colleagues reviewed the design documents) 30 30
Coding Standard Code specifications (development of appropriate norms for the current development) 60 30
Design Specific design 240 180
Coding Specific coding 300 360
Code Review Code Review 60 45
Test Test (self-test, modify the code, submit modifications) 360 60
Reporting report 60 60
Test Report testing report 60 60
Size Measuremen Computing workload 60 60
Postmortem & Process Improvement Pla Later summarized, and process improvement plan 120 60
total 2640 1815

Second, the calculation of the design and implementation of the interface module

design

As the project function is relatively simple, we only need to design two categories: window class, and dice classes.

  • Window class Form1: contains methods required for event trigger controls in a window;
  • Dice class Touzi: used to represent dice, comprising num attribute (represented dice), the method Dice (represented craps, num function is to obtain a random value).

achieve

Implementation process encountered many problems, I do not know how to start a picture show, how to play music, b through continuous access to information, how detailed do not open the file path will eventually solve these problems one. Not much deviation in the end we get in the program and expected.

Embody the principles of the code

- Information Hiding
the field num dice packaged as Num class attributes.

Third, the code review process

We were in the encoding process is to play the role of driver and navigator, a person write the code, and one in the side to remind, the equivalent of writing code when he checked again, in addition to our program less code, so the review process and What the problem is not found.
However, we found that the code readability is very low, thus increasing the number of comments, and try to standardize the code review process.

Fourth, the display calculation module of the unit test

Touzi touzi = new Touzi();
        [TestMethod()]
        //测试Dice方法是否总是能赋予Num一个1到6的值
        public void DiceTest()
        {
            bool judge = true;
            for (int i = 0; i < 10; i++)
            {
                touzi.Dice();
                if (touzi.Num<1||touzi.Num>6)
                {
                    judge = false;
                }
            }
            Assert.IsTrue(judge);
        }

Dice Method function class are Touzi dice, the dice to make random points to obtain the above code is used to test whether the method of Dice Touzi class num always assigned a value from 1 to 6.
The idea is by calling Dice method for 10 cycles, as long as one does not meet the requirements of change can not pass the test.
Here Insert Picture Description

V. pairing process

Twinning process, we share a computer, a person responsible for writing code, a responsible official, continue to rotate roles.
Here Insert Picture Description

Six additional features

We added a cool bgm in the program make the game more with feeling.

Guess you like

Origin www.cnblogs.com/ssylddd/p/11600829.html