Homework this week

Source: Internet
Author: User
Tags visual studio 2010

Plan:

Estimate how long this task will take to complete: 3-4 days.

Development:

Demand Analysis: 1h

User story: As a volleyball coach, I want to know the rank of each team in order to make a good deployment for my team.

Design Documentation:

1. Scoring and ranking the team

2, can query the team's scores and rankings

Code specification: Write according to the visual Studio 2010 specification.

Specific design: Activities

Design Review: 1h

Code specification: (Develop appropriate specifications for current development)

Namespace Volleyball

{Public partial class Form1:form

{Public Form1 ()

{InitializeComponent ();}

private void Button1_Click (object sender, EventArgs e)

{

if (txtguojia1. Text = = "" | | Txtguojia1. Text = = null)

{MessageBox.Show ("country name");}

if (Diyiju. Text = = "" && txtguojia1. Text! = "")

{if (int. Parse (diyichang1. Text) < 25)

{int a = Int. Parse (diyichang1. Text);

a++;

Diyichang1. Text = A.tostring ();

int c = Int. Parse (diyichang2. Text);

if (a = = && A-1 > C)

{MessageBox.Show ("first inning" + button1. Text);

Diyiju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();}

}

Else

{int a = Int. Parse (diyichang1. Text);

a++;

Diyichang1. Text = A.tostring ();

int c = Int. Parse (diyichang2. Text);

if (A-1 > C)

{MessageBox.Show ("first inning" + button1. Text);

Diyiju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}}

else if (Dierju. Text = = "" && txtguojia1. Text! = "")

{if (int. Parse (dierchang1. Text) < 25)

{int a=int. Parse (dierchang1. Text);

a++;

Dierchang1. Text =a.tostring ();

int c = Int. Parse (dierchang2. Text);

if (a = = && A-1 > C)

{MessageBox.Show ("second inning" + button1. Text);

Dierju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}

Else

{

int a = Int. Parse (dierchang1. Text);

a++;

Dierchang1. Text = A.tostring ();

int c = Int. Parse (dierchang2. Text);

if (A-1 > C)

{MessageBox.Show ("second inning" + button1. Text);

Dierju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}}

else if (Disanju. Text = = "" && txtguojia1. Text! = "")

{int fen = 25;

if (int. Parse (disanchang1. Text) < Fen)

{int a = Int. Parse (disanchang1. Text);

a++;

Disanchang1. Text = A.tostring ();

int c = Int. Parse (disanchang2. Text);

if (a = = Fen && a-1 > C)

{

MessageBox.Show ("third inning" + button1. Text);

Disanju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}

Else

{int a = Int. Parse (disanchang1. Text);

a++;

Disanchang1. Text = A.tostring ();

int c = Int. Parse (disanchang2. Text);

if (A-1 > C)

{MessageBox.Show ("third inning" + button1. Text);

Disanju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}}

else if (disiju. Text = = "" && txtguojia1. Text! = "")

{int fen = 25;

if (int. Parse (changneibifen1. Text) = = 3)

{MessageBox.Show (button1). Text);

return;}

else if (int. Parse (Changneibifen2. Text) = = 3)

{MessageBox.Show (button2). Text);

return;}

else if (int. Parse (changneibifen1. Text) = = 2 | | Int. Parse (Changneibifen2. Text) = = 2)

{fen = 25;}

if (int. Parse (disichang1. Text) < Fen)

{int a = Int. Parse (disichang1. Text);

a++;

Disichang1. Text = A.tostring ();

int c = Int. Parse (disichang2. Text);

if (a = = Fen && a-1 > C)

{MessageBox.Show ("part Four" + button1. Text);

Disiju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}

Else

{int a = Int. Parse (disichang1. Text);

a++;

Disichang1. Text = A.tostring ();

int c = Int. Parse (disichang2. Text);

if (A-1 > C)

{MessageBox.Show ("part Four" + button1. Text);

Disiju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}}

else if (txtguojia1. Text! = "")

{int fen = 25;

if (int. Parse (changneibifen1. Text) = = 3)

{MessageBox.Show (button1). Text);

return;}

else if (int. Parse (Changneibifen2. Text) = = 3)

{MessageBox.Show (button2). Text);

return;}

else if (int. Parse (changneibifen1. Text) = = 2 | | Int. Parse (Changneibifen2. Text) = = 2)

{fen = 15;}

if (int. Parse (diwuchang1. Text) < Fen)

{int a = Int. Parse (diwuchang1. Text);

a++;

Diwuchang1. Text = A.tostring ();

int c = Int. Parse (diwuchang2. Text);

if (a = = Fen && a-1 > C)

{MessageBox.Show ("fifth inning" + button1. Text);

Diwuju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}

Else

{int a = Int. Parse (diwuchang1. Text);

a++;

Diwuchang1. Text = A.tostring ();

int c = Int. Parse (diwuchang2. Text);

if (A-1 > C)

{MessageBox.Show ("fifth inning" + button1. Text);

Diwuju. Text = button1. Text;

int b = Int. Parse (changneibifen1. Text);

b++;

Changneibifen1. Text = B.tostring ();

}}}}

private void Button2_Click (object sender, EventArgs e)

{if (txtguojia2. Text = = "" | | Txtguojia2. Text = = null)

{MessageBox.Show ("Input team name"));}

if (Diyiju. Text = = "" && txtguojia2. Text! = "")

{if (int. Parse (diyichang2. Text) < 25)

{int a = Int. Parse (diyichang2. Text);

a++;

Diyichang2. Text = A.tostring ();

int c = Int. Parse (diyichang1. Text);

if (a = = && A-1 > C)

{MessageBox.Show ("first inning" + Button2. Text);

Diyiju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}

Else

{int a = Int. Parse (diyichang2. Text);

a++;

Diyichang2. Text = A.tostring ();

int c = Int. Parse (diyichang1. Text);

if (A-1 > C)

{MessageBox.Show ("first inning" + Button2. Text);

Diyiju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}}

else if (Dierju. Text = = "" && txtguojia2. Text! = "")

{if (int. Parse (dierchang2. Text) < 25)

{int a = Int. Parse (dierchang2. Text);

a++;

Dierchang2. Text = A.tostring ();

int c = Int. Parse (dierchang1. Text);

if (a = = && A-1 > C)

{MessageBox.Show ("second inning" + button2). Text);

Dierju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}

Else

{int a = Int. Parse (dierchang2. Text);

a++;

Dierchang2. Text = A.tostring ();

int c = Int. Parse (dierchang1. Text);

if (A-1 > C)

{MessageBox.Show ("second inning" + Button2. Text);

Dierju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}}

else if (Disanju. Text = = "" && txtguojia2. Text! = "")

{int fen = 25;

if (int. Parse (disanchang2. Text) < Fen)

{int a = Int. Parse (disanchang2. Text);

a++;

Disanchang2. Text = A.tostring ();

int c = Int. Parse (disanchang1. Text);

if (a = = Fen && a-1 > C)

{MessageBox.Show ("third inning" + Button2. Text);

Disanju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}

Else

{int a = Int. Parse (disanchang2. Text);

a++;

Disanchang2. Text = A.tostring ();

int c = Int. Parse (disanchang1. Text);

if (A-1 > C)

{MessageBox.Show ("third inning" + Button2. Text);

Disanju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}}

else if (disiju. Text = = "" && txtguojia2. Text! = "")

{int fen = 25;

if (int. Parse (changneibifen1. Text) = = 3)

{MessageBox.Show (button1). Text);

return;}

else if (int. Parse (Changneibifen2. Text) = = 3)

{MessageBox.Show (button2). Text);

return;}

else if (int. Parse (changneibifen1. Text) = = 2 | | Int. Parse (Changneibifen2. Text) = = 2)

{fen = 25;}

if (int. Parse (disichang2. Text)

{int a = Int. Parse (disichang2. Text);

a++;

Disichang2. Text = A.tostring ();

int c = Int. Parse (disichang1. Text);

if (a = = Fen && a-1 > C)

{MessageBox.Show ("part Four" + button2. Text);

Disiju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}

Else

{int a = Int. Parse (disichang2. Text);

a++;

Disichang2. Text = A.tostring ();

int c = Int. Parse (diyichang1. Text);

if (A-1 > C)

{MessageBox.Show ("sub-Council four") + Button2. Text);

Disiju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}}

else if (txtguojia2. Text! = "")

{int fen = 25;

if (int. Parse (changneibifen1. Text) = = 3)

{MessageBox.Show (button1). Text);

return;}

else if (int. Parse (Changneibifen2. Text) = = 3)

{MessageBox.Show (button2). Text);

return;}

else if (int. Parse (changneibifen1. Text) = = 2 | | Int. Parse (Changneibifen2. Text) = = 2)

{fen = 15;}

if (int. Parse (diwuchang2. Text) < Fen)

{int a = Int. Parse (diwuchang2. Text);

a++;

Diwuchang2. Text = A.tostring ();

int c = Int. Parse (diwuchang1. Text);

if (a = = Fen && a-1 > C)

{MessageBox.Show ("fifth inning" + button2. Text);

Diwuju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}

Else

{int a = Int. Parse (diwuchang2. Text);

a++;

Diwuchang2. Text = A.tostring ();

int c = Int. Parse (diwuchang1. Text);

if (A-1 > C)

{MessageBox.Show ("fifth inning" + button2. Text);

Diwuju. Text = Button2. Text;

int b = Int. Parse (Changneibifen2. Text);

b++;

Changneibifen2. Text = B.tostring ();

}}}}

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";

}}

Code review: 1h

Homework this week

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.