1, Requirements 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 the score of each team;
b, need to know two teams per game cumulative score;
C, the two teams score which team wins, how to express it;
2, creating the design document
interface of sub-interface in addition
3, design Review two hours
4, Code Specification No
5, specific design activity diagram
6. Code Writing
private void Btnd2_click (object sender, EventArgs e)
{
int D1 = Convert.ToInt32 (Txtd1.text);
int D2 = Convert.ToInt32 (Txtd2.text);
int DD1 = Convert.ToInt32 (Txtdd1.text);
int DD2 = Convert.ToInt32 (Txtdd2.text);
Txtd2.text = (b++). ToString ();
if (d2>= 24&& (D2-D1) >1)
{
Txtdd2.text = (Convert.ToInt32 (txtdd2.text) + 1). ToString ();
Txtd1.text = "0";
Txtd2.text = "0";
Txtcount.text + + + (i++) + "bureau:" + txtdd1.text + ":" + Txtdd2.text + "\ r \ n";
B= 1;
if (txtdd2.text== "3")
{
MessageBox.Show ("One team wins");
Txtd1.text = "0";
Txtdd1.text = "0";
Txtd2.text = "0";
Txtdd2.text = "0";
Txtcount.clear ();
}
}
if (dd1+dd2>3)
{
if (D2 >= && (D2-D1) > 1)
{
Txtdd2.text = (Convert.ToInt32 (txtdd2.text) + 1). ToString ();
Txtd1.text = "0";
Txtd2.text = "0";
Txtcount.text + + + (i++) + "bureau:" + txtdd1.text + ":" + Txtdd2.text + "\ r \ n";
b = 1;
if (Txtdd2.text = = "3")
{
MessageBox.Show ("Two teams win");
Txtd1.text = "0";
Txtdd1.text = "0";
Txtd2.text = "0";
Txtdd2.text = "0";
Txtcount.clear ();
i = 1;
}
}
}
}
private void Btnd1_click (object sender, EventArgs e)
{
int D1 = Convert.ToInt32 (Txtd1.text);
int D2 = Convert.ToInt32 (Txtd2.text);
int DD1 = Convert.ToInt32 (Txtdd1.text);
int DD2 = Convert.ToInt32 (Txtdd2.text);
Txtd1.text = (a++). ToString ();
if (D1 >= && (D1-D2) > 1)
{
Txtdd1.text = (Convert.ToInt32 (txtdd1.text) + 1). ToString ();
Txtd1.text = "0";
Txtd2.text = "0";
Txtcount.text + + + (i++) + "bureau:" + txtdd1.text + ":" + Txtdd2.text + "\ r \ n";
A = 1;
if (Txtdd1.text = = "3")
{
MessageBox.Show ("One team wins");
Txtd1.text = "0";
Txtdd1.text = "0";
Txtd2.text = "0";
Txtdd2.text = "0";
Txtcount.clear ();
}
}
if (DD1 + DD2 > 3)
{
if (D1 >= && (D1-D2) > 1)
{
Txtdd1.text = (Convert.ToInt32 (txtdd1.text) + 1). ToString ();
Txtd1.text = "0";
Txtd2.text = "0";
Txtcount.text + + + (i++) + "bureau:" + txtdd1.text + ":" + Txtdd2.text + "\ r \ n";
A = 1;
if (Txtdd1.text = = "3")
{
MessageBox.Show ("Two teams win");
Txtd1.text = "0";
Txtdd1.text = "0";
Txtd2.text = "0";
Txtdd2.text = "0";
Txtcount.clear ();
i = 1;
}
}
}
}
16 Week Summary