Pair job | |
---|---|
GitHub project address | project address |
Teammate blog address | Teammate address |
Job Link | The third job link |
1.PSP table
PSP2.1 | Personal Software Process Stages | Estimated time consuming (minutes) | The actual time-consuming (minutes) |
---|---|---|---|
Planning | plan | 25 | 25 |
Estimate | Estimated task time | 10 | 10 |
Development | Develop | 490 | 540 |
Analysis | demand analysis | 30 | 40 |
Design Spec | Generate design documents | 140 | 150 |
Design Review | Design Review | 60 | 60 |
Coding Standard | Code Specification | 20 | 20 |
Design | Specific design | 50 | 60 |
Coding | Specific coding | 90 | 100 |
Code Review | Code Review | 40 | 50 |
Test | Test (self-test, modify the code, submit modifications) | 90 | 90 |
Reporting | report | 60 | 60 |
Test Report | testing report | 50 | 50 |
Size Measurement | Computing workload | 20 | 20 |
Postmortem & Process Improvement Plan | Hindsight and propose improvement plan | 40 | 40 |
total | 1215 | 1315 |
2. Calculate the design and implementation of an interface module
(1) Design
In this project, we use the c # language and database implementation and the roll call recording function.
Program generally consists of the following components:
1.FormStudet // named window design
2.ShowRecordData // record design of the windows
is stored as student data 3.DataBase //
design 4.Entity // student attributes
flowchart as follows:
( 2) to achieve the effect display
1. load student
2. student loaded
3. randomly named functions implemented
4. recording function achieved named
3. Code review
1. Code specification
can refer cn fish blog: blog address
2. Code peer review, and found that the problem
because we are standing on the shoulders of giants (teacher code) project to make, so there is no case of this project, what particularly large problem. Since we are in a bedroom, communication is very convenient, but in the process of creating new features we encountered obstacles.
4. Code Description
(1) which is part of student data
public static List<Student> getAll()
{
studengList = new List<Student>();
Student stu1 = new Student("001", "王川", "男");
studengList.Add(stu1);
Student stu2 = new Student("002", "于丁", "男");
studengList.Add(stu2);
Student stu3 = new Student("003", "张莹", "女");
studengList.Add(stu3);
Student stu4 = new Student("004", "李楠", "女");
studengList.Add(stu4);
Student stu5 = new Student("005", "陈欣", "女");
studengList.Add(stu5);
}
(2) realize the function of recording data
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;
}
}
To achieve the main function of the form
public partial class FormStudet : Form
{
List<Student> stuList;
public FormStudet()
{
InitializeComponent();
}
void iniControl()
{
btnStart.Visible = false;
btnStop.Visible = false;
btnRecord.Visible = false;
btnLoadStu.Enabled = true;
}
void setControlVisible()
{
btnStart.Visible = true;
btnStop.Visible = true;
btnRecord.Visible = true;
btnLoadStu.Visible = false;
}
private void btnLoadStu_Click(object sender, EventArgs e)
{
//获取学生数据源
StudentDAO stuDao = new StudentDAO();
stuList = stuDao.getAllStudents();
//进度条设置
int stuCounts = stuList.Count;//及时学生人数
progressName.Maximum = stuCounts;
//构造数据源
DataTable dt = new DataTable();
dt.Columns.Add("stuID", Type.GetType("System.String"));
dt.Columns.Add("stuName", Type.GetType("System.String"));
dt.Columns.Add("stuSex", Type.GetType("System.String"));
//数据加载以进度条方式展现
foreach (Student stu in stuList)
{
dt.Rows.Add(stu.Id, stu.Name, stu.Sex);
progressName.Value += 1;//一个学生,进度条加1;
Thread.Sleep(50);
}
dataGVList.DataSource = dt;
setControlVisible();
}
DianMingRecord DianMiandata = new DianMingRecord();//一个记录对象
private void FrmStudent_Load(object sender, EventArgs e)
{
iniControl();
}
private void timerCountStu_Tick(object sender, EventArgs e)
{
Random ra = new Random();
int i = ra.Next(stuList.Count);
lblName.Text = stuList[i].Name;
}
private void btnStart_Click(object sender, EventArgs e)
{
timerCountStu.Start();
btnRecord.Enabled = true;
}
private void btnStop_Click(object sender, EventArgs e)
{
timerCountStu.Stop();
DianMiandata.DMrecord(lblName.Text);
}
private void btnRecord_Click(object sender, EventArgs e)
{
string data = DianMiandata.ShowRecord();
ShowRecordData SData = new ShowRecordData(data);
btnRecord.Enabled = false;
DialogResult dr = SData.ShowDialog();
if (dr == DialogResult.OK)
{ ClearData(); SData.Show(); }
}
public void ClearData()
{
for (int L = 0; L < DianMiandata.recordData.Length; L++)
DianMiandata.recordData[L] = null;
}
}
5. Additional features
Additional features are named data recording function, the effect achieved is as follows:
6. The display calculation module of the unit test
Unit testing items are as follows: