Soccer Player Database: Data Analysis and Visualization Project

Verified

Added on  2021/05/31

|11
|1265
|81
Project
AI Summary
This document presents a comprehensive solution to a Soccer Player Database project. The solution outlines the algorithm, including steps for adding players, searching for players, and visualizing data using histograms. The solution incorporates functions for adding, searching, and displaying data. The project includes flowcharts that visually represent the program's logic, making it easier to understand the data flow. A detailed test plan is also provided, including test data types, reasons for selection, and expected outputs. The solution also includes screenshots of the histogram visualizations for height and weight, demonstrating the project's data analysis capabilities. This project demonstrates data science concepts through practical application, providing a valuable resource for students.
Document Page
Algorithm
Step 1: Start the program
Step 2: Read all the lines from input file and stored into playerList
Step 3: Infinite loop start
Step 4: Display the menu (a – add new player, s – search player, v – visualize the data, q – quit)
Step 5: read the userChoice
Step 6: Check if userChoice is “q”, then go to Step 18, else go to Step 7
Step 7: Check if userChoice is “a”, then go to Step 8, else go to Step 10
Step 8: CALL addPlayer Method
Step 9: Go to Step 17
Step 10: Check if userChoice is “s”, then go to Step 11, else go to Step 1
Step 11: CALL searchPlayer Method
Step 12: Go to Step 17
Step 13: Check if userChoice is “v”, then go to Step 14, else go to Step
Step 14: CALL displayVisual Method
Step 15: Go to Step 17
Step 16: Print Invalid menu choice
Step 17: Continue the loop, go to Step 3
Step 18: Display the Bye Message
Step 19: End of the program
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Function addUser()
Step 1: Set IsContineue to y
Step 2: While IsContinue == ‘y’, if not, Go to Step 16
Step 3: Read the PlayerID
Step 4: Check if PlayerID has the length of 9, then go to Step 5, else go to Step 12
Step 5: Check if the IsPlayerIDExists(), then go to Step 6, else go to Step 10
Step 6: Read the player name, age, height and weight
Step 7: Store the player details into input file
Step 8: print the Player details into screen
Step 9: go to Step 15
Step 10: Print “Player ID already exists, please re-enter it” message
Step 11: Go to Step 15
Step 12: Print “Player ID should be nine digit” message
Step 13: Go to Step 15
Step 14: Read “Do you want to enter details for another player (Y/N)?”, IsContinue
Step 15: Go to Step 2
Step 16: Return to Main
End Function
Document Page
Function searchPlayer()
Step 1: Set searchContinue to y
Step 2: While searchContinue == ‘y’, if not, Go to Step 9
Step 3: Read the pid
Step 4: Check if the IsPlayerIDExists(), then go to Step 5, else go to Step 10
Step 5: Print the Player details
Step 6: Go to Step 8
Step 7: Read “Do you want to search for another player (Y/N)?”, searchContinue
Step 8: Go to Step 2
Step 9: Return to Main
End Function
Document Page
Function displayVisual()
Step 1: Set displayContinue to y
Step 2: While displayContinue == ‘y’, if not, Go to Step 13
Step 3: Print the “1. Age 2. Height 3. Width”
Step 4: Read “The visual attribute menu “,category
Step 5: Check if category=1, then go to Step 6, else go to Step 11
Step 6: Print the Histogram chart using age list
Step 7: Go to Step 11
Step 8: Print the Histogram chart using Height list
Step 9: Go to Step 11
Step 10: Print the Histogram chart using weight list
Step 11: Read the “Do you want to display the visualization(y/n) ?”, displayContinue
Step 12: Go to Step 2
Step 13: Return Main
End Function
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Flowchart
Start
filename=” "SoccerPlayerDB.txt"
True
Read userChoice
userChoi
ce=”a”
userChoi
ce=”s”
userChoi
ce=”v”
userChoi
ce=”q”
Print “A-Add Player, S-
Search Player, V – Visualize
the data, Q-Quit
Print “Invalid menu
option”
Print “Bye”
Stop
A
B
C
D
True
False
True
False
True
True
True
False
Document Page
A
Read playerID
IsContinue=”y”
IsContinu
e-=”y”
IsAlready
PlayerID
Exists
Read PlayerName,
age, height, weight
Save PlayerName, age,
height, weight to File
Read IsContinue
Print “Already player
ID exists”
D
True
False
False
True
Document Page
Read playerID
searchContinue=”y”
searchCon
tinue -=”y”
IsAlready
PlayerID
Exists
Print PlayerName,
age, height, weight
Read searchContinue
Print “Already player
ID exists”
D
B
False
True
True
False
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Read “1. Age, 2. Height , 3.
Weight”, category
dispContinue=”y”
dispContin
ue =”y”
Category
=1
Display the Histogram By
Age
Read dispContinue
Print “Invalid
category”
D
False
True
True
False
C
Category
=2
Display the Histogram By
Height
Display the Histogram By
Weight
Category
=3
False
True
True
False
E
E
Document Page
Test Plan
Test Data Table
Test
data
type
Test data
The reason
it was
selected
The output
expected due to
the use of the test
data
The screenshot of the actual output when the test data are
used
String
userChoice
(a,s,v,q or
else)
Add new
player
Read Player ID,
name, age and
Weight, and height
and Save to output
file
String
userChoice
(a,s,v,q or
else)
Search
player Read Player ID
Document Page
Test Data Table
String
userChoice
(a,s,v,q or
else)
Display the
histogram
by age
Read the Category,
Display the
Histogram in new
window
String
userChoice
(a,s,v,q or
else)
Add new
player Age = 3f
String
userChoice
(a,s,v,q or
else)
Search the
Player
Player ID
=000123343
String
userChoice
(a,s,v,q or
else)
Add the
Player
Player ID
=000010962
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Screenshots:
Histogram of Height
Histogram of Weight
chevron_up_icon
1 out of 11
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]