Process
㈠, Planning
① estimate how long this task will take: 9 days
㈡, development
① Demand Analysis:
Split into tasks, write code
This assignment is about the volleyball scoring program, from the volleyball game hobby to start, I hope every volleyball audience can better understand the score of the game.
As a volleyball enthusiast, I want to know the score of the volleyball match so as to better master the score of the game.
Task: A, as a volleyball enthusiast needs to know each game A, B two team score;
b, need to know two teams per game cumulative score;
C, the two teams score which team wins, how to express it;
② Creating the design document:
Presentation layer: ① Audience
(Code implementation: WinForm form)
Business layer: Judging
Data Source:--→db
③ Design Review
3 hours
④ Code specification (to develop appropriate specifications for current development)
⑤ Specific design:
Save the score in the database, select a field in the form control, and show the score.
⑥ Specific code:
int SumA = 0;
int sumb = 0;
Boolean i = true;
Boolean J = true;
Boolean m = true;
Boolean n = true;
Boolean o = true;
int Shengchang = 0;
int Bshengchang = 0;
private void Cmb1_selectedvaluechanged (object sender, EventArgs e)
{
if (This.cmb1.Text.Equals ("first field")) {
This.txt1.Text = "26";
This.txt2.Text = "24";
if (i)
{
int a = Int. Parse (txt1. Text);
int b = Int. Parse (txt2. Text);
SumA + = A;
Sumb + = b;
This.sumgrade (SumA, sumb);
i = false;
if (a > B) {
shengchang++;
This.textBox3.Text = Shengchang. ToString ();
}
else if (a < b) {
bshengchang++;
This.textBox4.Text = Bshengchang. ToString ();
}
}
}
else if (this.cmb1.Text.Equals ("second field"))
{
This.txt1.Text = "25";
This.txt2.Text = "27";
if (j) {
int a = Int. Parse (txt1. Text);
int b = Int. Parse (txt2. Text);
SumA + = A;
Sumb + = b;
This.sumgrade (SumA, sumb);
J = false;
if (a > B) {
shengchang++;
This.textBox3.Text = Shengchang. ToString ();
}
else if (a < b)
{
bshengchang++;
This.textBox4.Text = Bshengchang. ToString ();
}
}
}
The following omitted sections
public void Sumgrade (int a,int b) {
This.textBox1.Text = A.tostring ();
This.textBox2.Text = B.tostring ();
}
private void Button1_Click (object sender, EventArgs e)
{
SumA = 0;
Sumb = 0;
i = true;
J = true;
M = true;
n = true;
O = true;
Shengchang = 0;
Bshengchang = 0;
This.textBox1.Text = "";
This.textBox2.Text = "";
This.textBox3.Text = "";
This.textBox4.Text = "";
This.txt1.Text = "";
This.txt2.Text = "";
This.cmb1.Text = "";
}
⑦ Code review: 4 hours
⑧ Testing (self-test, code change, commit code): half an hour
㈢, reporting
① Test Report:
② Computational effort:
16th Week Summary