Blog Requirements
Github project Address: https://github.com/zhibihuayue/PairProgramming
Job address: https://www.cnblogs.com/cherish599/p/11577268.html |
A, PSP estimated time table
PSP2.1 | Personal Software Process Stages | Estimated time consuming (minutes) | The actual time-consuming (minutes) |
---|---|---|---|
Planning | plan | 45 | 45 |
Estimate | Estimate how much time this task requires | 45 | 45 |
Development | Develop | 720 | 660 |
Analysis | Needs analysis (including learning new technologies) | 45 | 30 |
Design Spec | Generate design documents | 30 | 30 |
Design Review | Design review (and colleagues reviewed the design documents) | 30 | 45 |
Coding Standard | Code specifications (development of appropriate norms for the current development) | 30 | 30 |
Design | Specific design | 60 | 60 |
Coding | Specific coding | 300 | 450 |
Code Review | Code Review | 60 | 60 |
Test | Test (self-test, modify the code, submit modifications) | 90 | 90 |
Reporting | report | 70 | 90 |
Test Report | testing report | 30 | 30 |
Size Measurement | Computing workload | 25 | 30 |
Postmortem & Process Improvement Plan | Later summarized, and process improvement plan | 20 | 30 |
total | 1600 | 1725 |
Second, the project cloning
1. class warehouse.
2. Go PairProgramming folder, create a new file using your own folder.
3.VS software development
Third, code design
1. calculation module interface design and implementation
Problem-solving ideas
Note that the dice game is provided generating a random number, and the digital random number is compared with the external input, and returns the result.
Design and implementation process
I and D to be discussed in school, combined with some of the content online for production of our group project. Due to the small main production, I am responsible for tabulation and other operations.
Code shows (I'm responsible for the code section)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Collections;
using Entity;
namespace DataBase
{
public class DiceData
{
private static List<Dice> diceList;
public static List<Dice> getAll()
{
diceList = new List<Dice>();
Dice num1 = new Dice("1");
diceList.Add(num1);
Dice num2 = new Dice("2");
diceList.Add(num2);
Dice num3 = new Dice("3");
diceList.Add(num3);
Dice num4 = new Dice("4");
diceList.Add(num4);
Dice num5 = new Dice("5");
diceList.Add(num5);
Dice num6 = new Dice("6");
diceList.Add(num6);
return diceList;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Collections;
using Entity;
namespace DataBase
{
public class DiceData
{
private static List<Dice> diceList;
public static List<Dice> getAll()
{
diceList = new List<Dice>();
Dice num1 = new Dice("1");
diceList.Add(num1);
Dice num2 = new Dice("2");
diceList.Add(num2);
Dice num3 = new Dice("3");
diceList.Add(num3);
Dice num4 = new Dice("4");
diceList.Add(num4);
Dice num5 = new Dice("5");
diceList.Add(num5);
Dice num6 = new Dice("6");
diceList.Add(num6);
return diceList;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Entity;
using DataBase;
namespace DaoLayer
{
class DaoDice
{
public class StudentDAO
{
public int getDiceRecordsNums()
{
List<Dice> DiceList = DiceData.getAll();
return DiceList.Count;
}
public List<Dice> getAllDice()
{
List<Dice> diceList = DiceData.getAll();
return diceList;
}
}
}
}
2. Display Interface
3. Code review and modules of the unit test ( in Ding Bo off )
Fourth, the process of twinning
1. Twinning members (Jiu Jiang Lin & Yu Ding)
2. The content prepared in advance
Our group plans to do two different versions, I do first a console application, the code below is what I do out of the content in advance, to make changes based on this, the final form of the program is determined by the program.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GuessNumber
{
class Program
{
static void Main(string[] args)
{
const int GuessChance = 7;
while (true)
{
Console.WriteLine("*********************欢迎来到猜数字*********************\n");
//生成一个随机数.
int targetNum = new
Random().Next(1, 101);
for (int i = 1; i <=
GuessChance; i++)
{
//输入猜想.
Console.Write("请输入猜想 {0}:
", i);
int guessNum =
Convert.ToInt32(Console.ReadLine());
Console.WriteLine("猜想 {0}:
{1}", i, guessNum);
//判断猜大了还是猜小了.
if (guessNum >
targetNum)
{
Console.WriteLine("猜大了!");
}
if (guessNum <
targetNum)
{
Console.WriteLine("猜小了!");
}
//猜中了.
if (guessNum == targetNum)
{
Console.WriteLine("恭喜你猜中了!");
Console.WriteLine();
break;
}
Console.WriteLine();
}
//是否继续游戏的判断.
Console.WriteLine("是否再来一次游戏?y/n");
string comfirm =
Console.ReadLine();
if (comfirm == "y" ||
comfirm == "Y")
{
Console.WriteLine();
continue;
}
else
{
Console.WriteLine("游戏结束!");
break;
}
}
Console.ReadKey();
}
}
}
3. Results show
V. Summary
The job really too lucky, actually ushered in the founding of seventy Daqing, Xiao comrades had to put heavy computer moved back home to finish the job.
For this work, our group is not the case with a teacher (attendance system) to do our presentation, I took the test and to Dingsi moment, decided not to come to the same thing, and then select a dice game. We made some changes to the dice game that digital restrictions (dice select up to six) have no choice, they simply change a little once.
Thank you very much to help my teammates Tintin students, taught me a lot, I also recommend using the git client software, really easy to use number. Code needs to continue working on it, Come on Come on!