Instructions:

1. Make a windows application in Visual Studio and name it as A1YourFirstnameYourLastname.

2. Design a form that looks something like the one below: see image.

3. Use a ListBox control to display 8 sports teams.

  • You can choose any sport you like, and any teams.
  • For example, soccer, basketball, hockey, cricket etc.

4. Add a button to randomly draw the teams against eachother in quarter-finals.

5. Add a reset button that resets the form.

6. Add GroupBox controls to represent different levels of the knockout tournament, like quarter-finals, semi-finals and final game.

7. On the initial form load, fill the ListBox with 8 teams.

8. All other buttons are disabled, except for Draw Teams and Reset Game.

9. On clicking the Draw Teams button, randomly draw all the teams and place their matches in the quearter-finals.

  • And disable the Draw Teams button.

10. Enable the Play button for the first quarter-final game while keeping all other Play buttons disabled.

11. On clicking the Play button for the first quarter-final game:

  • Generate a random number for each team to show the scores.
  • Keep the random numbers realistic.
  • For example, if it is soccer, you can generate random numbers between 0 and 5 (both inclusive). For basketball, it can be between 80 and 130.

12. Assign the winning team to the semi-final.

13. Change colors of teams to show the winning the losing teams.

14. Note that there should not be a tied game, as it is a knockout stage.

  • The random number for the second team should never be equal to the first team's score.

15. After this, disable the Play button for the first quarter-final match and enable the Play button for the second quarter-final match.

16. Repeat these steps for all the matches up to the final game.

17. The Reset Game button resets all the controls back to their default behaviours.

  • All Play buttons are disabled.
  • All the winning/losing team colors are set back to black.
  • All the labels showing the team names and their scores in the GroupBoxes are cleared.
  • Draw Teams button is enabled.

18. Clicking the Draw Teams button again randomly draws teams for quarter-finals.

19. Change the icon in the title bar of the form from a default icon to something else.

20. Disable the Maximum button in the title bar.

21. Give proper names to all the controls used in the form, including the form itself.

22. Customize the form according to your own imagination. You can change the background color, fonts, font color, team flags, or whatever you can think of.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.