Tournament Planner and Updater Tool
Tournament Planner and Updater Tool
The possible solution to create an efficient and reliable tournament style and planner. It will
implement a Robin-round tournament style seeing that it is the most fair and reliable format
that efficiently makes use of competitors’ sporting abilities during the tournament. Instead of
having a lot of paper work, you can make use of this program. It will be able to add participants
into the tournament. Add games as well as delete games. This program will also be able to
update information if changes are made without affecting other data. Using validation
techniques, it will ensure that adequate required information is provided. It will ensure that
eligible participants are allowed to enter the competitions. To protect data, a security system
will be implemented in this program. This will make sure that admin users and normal users
have access to the correct information. Thus, the user will have to login with the correct
credentials to access information. Then the program will help users to navigate and report to
their needs.
Scope
This program will be able to implement a tournament style for the user and determine the
winner at the end of the tournament. What it will not be able to do is: to implement other
tournament styles besides the Robin round. It will not be able to automatically schedule games;
the admin user is the one that coordinates the addition of games.
Task Definition
Sports organisers are in-need of a tournament style planner and updater to help them to
efficiently coordinate sporting events. Organisers need a program that is able to input data and
update existing data that pertain to the tournament. After a critical analysis of tournament
management – it was discovered that organisers struggle with adding more participants and
creating valid games for the tournament. Without an efficient program, organisers find
themselves with unorganised manually collected data that is either paper-based or stored on a
random database. Manual data collection brings about human error and it is time consuming.
The problems of not having a tournament style planner is that: it is harder to update data,
update scores, add or delete participants or games. Without a proper tournament planner that
is able to update data – the organiser ends up with inaccurate and inconsistent data. Secondly,
participants do not have access to game dates unless told by the organiser. If the organiser
does not tell a participant about a tournament – he/she will not be able compete. The solution
to thus problem is to help organisers efficiently plan sporting events in-order to provide a
memorable and successful sports experience. This tournament style planner and updater will
be able to: provide accurate and up to date information to participants, improve
communication keeping all parties informed through a convenient access for all users. It will
allow organisers to retain full control, to change schedules, update scores and even cancel
games. It should capture all the accurate participant data and allows access to this data by the
correct members. Using validation techniques, it will ensure that adequate required
information is provided. It will ensure that eligible participants are allowed to enter the
competitions. To protect data, a security system will be implemented in this program. This will
make sure that admin users and normal users have access to the correct information. The
target audience is not only the sports organisers but participants and coaches too. This program
will be able to execute a tournament style planner for a tennis
tournament and decide the champion at the conclusion of the competition. What it'll not be
able to do is: to execute other competition styles other than the Robin Round. It'll not be able
to consequently plan games; the admin user is the one that facilitates the addition of tennis
games and keep up with scoring.
User Story and Acceptance Test
Possible Task Normal Requirement Administrators
Requirement
Require username No specific requirement No specific requirement
Require password At least eight At least eight
characters in length characters in
2 integers minimum length
At least one special 2 integers
character that is minimum
neither a letter of the At least one
alphabet or a number. special character
that is neither a
letter of the
alphabet or a
number.
Username: complex or simple Simple Simple
Password: complex or simple Complex Complex
Add Learner
ADMINISTRATIVE USER
Database Design
Table Design
Table Name: Player
Relationship Description
Role of Database
The main purpose of this database is to store data for the users – specifically, to store the
information about the tournament. The database consists of two tables that store important
data – one being the Player Table: The ‘Player’ table stores the participants’ data. When a
tennis participant joins the league through the tournament style planner – he/she is
automatically added to the Player table. The normal user and the admin user both can add
players but only the admin user (tournament organiser/coordinator) can edit players’
information. When there is a concern about pre-recorded data – it is recorded to the admin.
Then the admin -using the tournament style planner- can make modifications. When a player is
added to the official participants (Players’ table), he or she is automatically assigned to a unique
ID.
Secondly, the database consists of a ‘Game’ table which will only be manipulated by the admin
user to create, add or delete games. The data in this table can be accessed by all types of users
but can be modified by the admin user (sport organiser/coordinator). It will appear as a ‘Read-
Only’ to the normal users (General school coaches and participants).
Navigation
Navigation from the start, through home, to the login page.
Navigation from the login page after entering correct admin login credentials.
Navigation from the login page to the normal user page after correct user credentials.
Data dictionary
Textfile
Textfile: Deletedgames.txt
This textfile is used to store games that are deleted from the database. If the tournament
coordinator accidently deleted a record, they are able to retrieve it from the textfile. This
textfile will act as “recycle bin” that we store all deleted records of game information
Screenshot of textfile:
Arrays
Purpose:
How are the arrays going to be used?
Two parallel arrays and an additional array are going to be used as follows:
The first parallel arrays of this program are going to be used to store all schools involved in the
tournament. They are utilised in the program to avoid participants from the same school having
a match together. When the program is executed it goes through all schools in a database,
perform some function to get rid of duplicates and store the unique schools in an array. In
terms of arrays, the first array stores all schools in a database, then functions are performed
using the first array to get rid of duplicate schools in the first array. Once the duplicates are
eliminated, the remaining unduplicated schools are stored into the second array. This array will
be assigned to a combobox whereby all schools in the array become items of the combobox.
When a specific school is selected, the learners that belong to that school will be visible to the
admin user. These learners are extracted from the third array which is parallel to the first
because when schools were added to the first array, learner names were also added
simultaneously to the third array.Thus, this will ensure that, when the admin user is adding
games – he/she will not create a match between 2 players of the same school.
1 2 3 4 … 1000
Populate Array
First array: this array is populated using a while loop, it adds all schools that are in the database.
Second Array: this array is filled using a while loop that is terminated when the end of database
is reached, it will continuously add player names to the array until the end of table.
Third array: this array is populated after the schools is the first array are processed and
duplicated are eliminated.
Declaration
arrNames: array [1 .. 1000] of string;
arrSchools: array [1 .. 1000] of string;
arrDiffSchools: array [1 .. 1000] of string;
Gui Design
GUI1: Welcome Page
TOE Chart
T – task
O – object
E – Event
TOE Chart
TOE CHART
TOE CHART
TOE Chart
TOE Chart
Validation
Input Validation
Input Validation
Data Type Component Validation type. Message Message
when Data when Data
Validated does not
validate
UserName edtUsername: TEdit Check that the person entered “Correct “Enter your
data credentials” username”
Password edtPassword: Check if the user has Show Show
TMaskedEdit entered data message message
Performs a check digit Actual Actual
to check if the length is Message Message
at least 8 characters,
Check if there is an “Correct “Enter your
integer value, a special credentials” password”
character and enough
letter.
sPlayerName edtPlayerName: Performs a datatype Showmessage Showmessage
TEdit check Actual Actual
Contains no numbers, message: message:
spaces or special
characters “Enter a
Name that
only contains
letters”
iAge sedAge: TSpinEdit A range check is Showmessage
performed on the age Actual
entered. Message:
A participant in a junior “Enter
team must fall appropriate
between the following age”
age range: 12 – 14
A senior participant’s
age must fall under the
following age range:
15-18.
Process
Data processing
ALGORITHM:
ALGORITHM
with dmTennis do
begin
iid := inputbox(‘ID’,’Enter ID’,inttostr(’’))
case rgpEdit.itemindex of
0:
begin
sNewName := edtNewNAME.text;
bfound := false;
tblPlayer.first;
while (not tblPlayer.eof) and (bfound <> true) do
begin
if tblPlayer['PlayerID'] = iID then
begin
bfound := true;
tblPlayer.edit;
tblPlayer['Name'] := snewName;
tblPlayer.post;
end;
tblPlayer.next;
end;
end;
1:
begin
sSchool := edtSchoolName.text;
bfound := false;
tblPlayer.first;
while (not tblPlayer.eof) and (bfound <> true) do
begin
if tblPlayer['PlayerID'] = iID then
begin
bfound := true;
tblPlayer.edit;
tblPlayer['School'] := sSchool;
tblPlayer.post;
end;
tblPlayer.next;
end;
end;
2:
begin
if rgpChooseTeam.itemindex = -1 then
begin
showmessage('Please select a new Team');
exit
end;
sNewTeam :=
rgpChooseTeam.items[rgpChooseTeam.itemindex];
bfound := false;
tblPlayer.first;
while (not tblPlayer.eof) and (bfound <> true) do
begin
if tblPlayer['PlayerID'] = iID then
begin
bfound := true;
tblPlayer.edit;
tblPlayer['Team'] := sNewTeam;
tblPlayer.post;
end;
tblPlayer.next;
end;
end;
3:
begin
iNewAge := sedNewAge.value;
bfound := false;
tblPlayer.first;
while (not tblPlayer.eof) and (bfound <> true) do
begin
if tblPlayer['PlayerID'] = iID then
begin
bfound := true;
tblPlayer.edit;
tblPlayer['Age'] := iNewAge;
tblPlayer.post;
end;
tblPlayer.next;
end;
end;
end;
end;
end;
Deleting a player from a Database 1. The admin user will enter a PlayerID that will
uniquely identify the player that is supoosed
be deleted
2. The program searches for a record with that
specific ID.
3. Once the record is found that has a player with
that specific ID, the program checks whether the
player was involved in a game or not from the
Games table
4. If the player was involved in a game, to avoid
errors- the program will inform the user that
record cannot be deleted.
5. If the player was not involved in a game, then the
record can be deleted and a message pops
informing the successful procedure.
ALGORITHM
1. Input
2. Name combobox
3. Bfound false
4. Locate a player with the same Name
5. Once found bfound true and we ID player’S
ID
6. Check for a learner with that specific ID in the
games table
7. If found, player is not deleted
8. If not found, Player is deleted
with dmTennis do
begin
// we want to make sure we delete a player that has not
played a game
sName := cmbDeleteNames.text;
bfound := false;
tblPlayer.first;
while (not tblPlayer.eof) and (bfound <> true) do
begin
if tblPlayer['PlayerName'] = sName then
begin
bfound := true;
iID := tblPlayer['playerid']
end;
tblPlayer.next;
end; // end of while loop
bfound := false;
tblGames.first;
while (not tblGames.eof) and (bfound <> true) do
begin
if (tblGames['PLAYERID1'] = iID) or
(tblGames['PLAYERID2'] = iID) then
begin
bfound := true;
end;
tblGames.next;
end;
sName := cmbDeleteNames.text;
bfound := false;
tblPlayer.first;
while (not tblPlayer.eof) and (bfound <> true) do
begin
if tblPlayer['PlayerName'] = sName then
begin
bfound := true;
tblPlayer.delete;
end;
tblPlayer.next;
end; // end of while loop
// we want to refresh the data inside the combobox
cmbDeleteNames.clear;
tblPlayer.first;
while not tblPlayer.eof do
begin
cmbDeleteNames.items.add(tblPlayer['PlayerName']);
tblPlayer.next;
end; // end of while loop }
cmbDeleteNames.sorted := true;
// end of using data module
end;
Output
Data Format Component
Name, Surname, details and Name: <name field in text> memDetails : TMemo
count Surname: <surname field>
Details: tab<count variable>
Data contained in the ‘Player’ ---------- TDBGrid
database table
Data contained in the ‘Player’ ---------- TDBGrid
database table
Game Details Text memGames
Data contained in the ‘Player’ N/A TDBGrid
database table
Data contained in the ‘Game’ N/A TDBGrid
database table
Data contained in the ‘Game’ N/A TDBGrid
database table
Data contained in the ‘Game’ N/A TDBGrid
database table
Name of the first player in a Text TPanel: pnlPlayer1
match
Name of the second player in Text TPanel: pnlPlayer2
opposition to the first player
Display the game to be edited Text TRichEdit: redGame
Display the game to be deleted Text TRichEdit: reddelGame
Bibliography
L.Roundy.Study.com.Physical, Social and Emotional Benefits of Participating in
Sports.11/15/2021. https://study.com/academy/lesson/physical-social-and-
emotional-benefits-of-participating-in-
sports.html#:~:text=Participating%20in%20sports%20has%20a,%2C%20physical%
20fitness%2C%20and%20strength.
C.Berman.SportsRec.Advantages & Disadvantages of Single
Elimination.09/04/2011. https://www.sportsrec.com/advantages-disadvantages-
single-elimination-12031976.html