Tournament

Take on the task of completing this project with the construction of the Tournament class and integrating all other classes with it.

We’ve reached the final stage of the project. Up to this point, we’ve constructed the foundational classes needed for our project, but the core component that ties everything together—the Tournament class—is yet to be implemented.

Press + to interact
UML diagram highlighting the development focus on the tournament class
UML diagram highlighting the development focus on the tournament class

Previously, we discussed the PlayerGameStats class, which encapsulates individual player statistics within a game. Now, the focus shifts to the Tournament class, where we can integrate all prior classes and build the tournament’s structure. The Tournament class will hold various essential elements, such as a list of teams and games, and will be responsible for determining the tournament winner, highest scorer, and MVP.

The Main class acts as the client and central controller, facilitating the construction and testing of our project. As the Tournament class will manage the list of games, we no longer need this list in the Main class. Instead, the Main class will delegate game management to the Tournament class. Therefore, the project structure becomes more modular and easier to maintain.

Let’s examine the primary elements of the Tournament class.

Data members

  • Name: The name of the tournament

  • Season: Represents the tournament’s season, typically the year it takes place

  • Teams: A list of teams participating in the tournament

  • Games: A list of games played during the tournament

  • MVP: The most valuable player of the tournament ...

Member functions