Volleyball Scoring Program:
One, design
It takes a week to estimate the task.
Second, the development
1, Requirements analysis---"split into tasks, write code
as an event manager, I would like to know the score and points of each game team in order to give each team rankings.
Task: 1 "As the event manager needs to know each game A, B two team score;
2 "need to know two team points situation;
2, creating the design document
The demand of the volleyball user story shows that the program is used to count the scores and points of each team.
3, Design Review 2 hours
4, code specification according to VS2010
5, specific design
Activity Chart
Each game has a score for each of the teams after a goal,
That team first reached 25 points, which team wins, five innings three wins
The final score for each team will be shown below.
6, (a) specific code (encoded) three days
(b) interface Design (screenshot)
Writing code
private void Button1_Click (object sender, EventArgs e)
{
Juci. text= (int. Parse (Juci. Text). +1). ToString ();
Txta.text = "0";
Txtb.text = "0";
}
private void Label4_click (object sender, EventArgs e)
{
if (int. Parse (txta.text) > int. Parse (Txtb.text))
{
Bisai. Text = Juci. Text + "innings" + "Match score:" + "a team" + ":" + "B" + "=" + Txta.text + ":" + txtb.text + "+" a team "+" win "+" B ";
}
Else
{
Bisai. Text =juci. Text + "innings" + "Match score:" + "a team" + ":" + "B" + "=" + Txta.text + ":" + txtb.text + "+" a team "+" defeat "+" B ";
}
if (int. Parse (txta.text) = = Int. Parse (Txtb.text))
{
Bisai. Text = Juci. Text + "innings" + "Match score:" + "a team" + ":" + "B" + "=" + Txta.text + ":" + txtb.text + "+" a team "+" draw "+" B team ";
}
}
private void Label1_click (object sender, EventArgs e)
{
}
private void Button2_Click (object sender, EventArgs e)
{
if (int. Parse (Txta.text)-1 > 0)
{
Txta.text = (int. Parse (Txta.text)-1). ToString ();
}
}
private void Button3_Click (object sender, EventArgs e)
{
if (int. Parse (Txta.text)-1 > 0)
{
Txtb.text = (int. Parse (Txtb.text)-1). ToString ();
}
}
private void Btna_click (object sender, EventArgs e)
{
txta.text= (int. Parse (Txta.text) +1). ToString ();
Btna.enabled = true;
}
private void Bunb_click (object sender, EventArgs e)
{
txtb.text= (int. Parse (Txtb.text) +1). ToString ();
Bunb.enabled = true;
}
private void Bisai_textchanged (object sender, EventArgs e)
{
}
}
private void Texguojia1_textchanged (object sender, EventArgs e)
{
Button1. Text = Txtguojia1. text+ "Win";
}
private void Texguojia2_textchanged (object sender, EventArgs e)
{
Button2. Text = txtguojia2. text+ "Win";
}
8, code review a half an hour
Third, the report
1, test Report
The program was not tested because it was not well known to the test
2, calculate the workload for three days
3, Summary
Not with the 30% architecture, try to do it with a 30% architecture.
18 Week final Sprint