Table of Contents Executive Summary 2



Download 471.88 Kb.
Page12/17
Date31.07.2017
Size471.88 Kb.
#25812
1   ...   9   10   11   12   13   14   15   16   17

3.3 Fan Application


The fan application will allow anyone with a smart phone to view the games, teams, players and their stats that are loaded into the database. Through the users phone it will access the data base to show up to date information on current and past games. It has three major sections; the information on current and past games, teams with all their stats and schedules, and the players with their stats. These are implemented in an easy to use interface that allows users to search for their teams and players and track them. The interface consists of a top menu, game, team, and player search pages, a player stat page, team stat pages, and current and past game pages. A preliminary class diagram of fan application can be seen below in 3.3 Figure 1.

main.jpg

3.3 Figure 1: Class diagram of the fan application with estimated variables and functions.
From the top menu the user can select three options; game search, team search, and player search. This will bring the user to the corresponding page. These pages will allow the user to easily search and browse through the database and view their individual information. Also, on every screen will be three buttons which will bring them to a selected league stats, player stats, or a game they are watching. These menus will allow the user to set a certain game or player they can instantly jump to while scanning through the data base. The fan app will be created in java.


3.3.1 User Interface


When the application is started it brings the user to a top menu. This is the heart of the application that takes the user to where they want to go. In 3.3.1 Figure 1 is a flow chart of the pages the user can access.

flowchart.png

F3.3.1 Figure 1: A flow chart of the user interface.
The top menu is in the center and links to all the pages from there. In the program the top menu will only include links to other pages and the data stored to go to the user selected player, game, and league. A basic idea of the top menu is shown bellow (figure 3.2.3). From here basic examples will be shown for each page in the interface. A logo and product name will be added to the empty space at the top of this interface at a later date. From here the next top page is the current and recent games page. This page is shown in 3.3.1 Figure 2 bellow. This screen allows the user to see current games being played as well as games that start soon and recent games already completed. For games in progress the current score will be shown as well as the inning. For games starting soon the time and date will be shown. Games that already ended will have their final score as well as the date the game ended. On this page the user can select a game. This will bring them to the game screen. This page, seen bellow in 3.3.1 Figure 3, shows the information on that selected game. It shows the score board with each inning, the number of strikes, balls, and outs. It also shows the plays in descending order, allowing the user to scroll through and select a play to show more detailed information about it.

top menu.png current games.png

3.3.1 Figure 2 (left) and 3.3.1 Figure 3 (right): Top menu of the user interface and Current games page
The next page (shown below in 3.3.1 Figure 4) is the plays page. When the user selects a play it opens this page, displaying what happened and who was involved in the play. Clicking on a name or team on this page will take the user to that player or team’s respective page with their information. This screen also displays the play number in this game. Also, clicking on the team tame on the game page will take the user to that team’s page (shown in 3.3.1 Figure 5 below).
Back to the top menu the next interface page is the team search screen. This lets the user enter a team name and search the database for them. After searching, teams that resemble the search subject most will be displayed below and allow the user to scroll through it and select that team taking them to their respective page. It also shows the teams record. This page is shown bellow in 3.3.1 Figure 6. Next is the team’s page. This will show a lot of useful information about the team, including their record, who they’ve played, who they’ll play, their coach, players and more. From here the user can select a game which will take them to that games page or one of the team’s players which will take the user to that player’s page. An example of the team page is shown bellow in 3.3.1 Figure 7.
game.png playscreen.png

3.3.1 Figure 4 (left) and 3.3.1 Figure 5 (right): Game screen showing score and plays and Play screen showing more info on a play
The user can also choose to search for a player from the top menu by selecting find a player. This will take them to the player search page that works much like the team search page. The user can enter a name (first, last, or both) to search the database for a certain player. The database will load a list of possible matches in the area bellow that the user can scroll through and select a player, taking them to their player page with their stats. The player search screen is shown below in 3.3.1 Figure 8. The player page shows all the information for that player. This includes their name, age, team, what position they play and all of their stats. It also includes a picture if one is available in the database. From here the user can also select the player’s team and go to their team page. An example of the player page is bellow in 3.3.1 Figure 9.
The last page is the league page. This is accessible from any page in the application. It allows the user to select a league to follow and shows all the teams with records. The user can also access the team pages from here. An example of the league page is bellow in 3.3.1 Figure 10.

team search.png teampage.png

3.3.1 Figure 6 (left) and 3.3.1 Figure 7: Team search screen showing their scores and Team information page

player search.png player.png

3.3.1 Figure 8 (left) and 3.3.1 Figure 9 (right): Player search screen and Player page with all their information

league.png

3.3.1 Figure 10: League page with the teams in each league


3.3.2 Methods


When the pages are loaded they will draw the data directly from the database, filling in the three classes that make up the application. The game class will consist of an array of type teams, the score, time of the game, inning, and all other data that defines the game. The team class will consist of an array of type players, the coach’s name, the team name, their record, and an array of the games they’ve play and have yet to play. The last class, player, will hold the players name, age, position, team, picture and their stats. The following tables (3.3.2 Tables 1-3) list the methods and what they do for each class:
Games class:

Method

Description

getTeams()

Returns the array of teams saved in the Game class

setTeams()

Sends a call to the database to populate the teams array in the game class with the teams in that game.

getScore()

Returns the score for that game from the score variable in the class.

setScore()

Sends a call to the database for the current score of the game. It saves it in the game class’s Score variable.

getPlay()

Returns an array of type play from the class.

setPlay()

Sends a call to the database to populate the Plays array with the list of plays for that game.

3.3.2 Table 1: A complete list of methods for the Game class.
Team class:

Method

Description

getLeague()

Returns the string League from that team’s class.

setLeague()

Sends a call to the database to acquire the team’s league name and stores it in the League variable.

getName()

Returns the string Name of the team.

setName()

Sends a call to the database to acquire the team’s name and stores it in the Name variable.

getPlayers()

Returns the array variable Players that is an array of type player and contains a list of the players for that team.

setPlayers()

Sends a call to the database to populate the Players array with the list of players for that team. The database sends each player in the format of a Player class and the list is stored in the Players array.

getStats()

Returns the array Stats that has all the information about the team in an array.

setStats()

Sends a call to the database to populate the Stats array with each stat of the team. The database sends each part separately and they are stored in the Stats array in that team’s class.

3.3.2 Table 2: A complete list of methods for the Team Class.
Player Class:

Method

Description

getName()

Returns the name of the Player from the string variable Name.

setName()

Sends a call to the database to acquire the name of the player and stores it in the string variable Name.

getAge()

Returns an integer value Age that contains the age of the player.

setAge()

Sends a call to the database to acquire the age of a player and stores is in the integer variable Age.

getTeam()

Returns the string variable Team that contains the name of the team the player is on.

setTeam()

Sends a call to the database to acquire the name of the team the player is on and stores it in the string variable Team.

getPosition()

Returns the string variable Position that contains the name of the position the player is assigned to.

setPosition()

Sends a call to the database to acquire the name of the position the player is on and stores it in the string variable Position.

getStats()

Returns the floating point variable Stats that contains the stats of the player.

setStats()

Sends a call to the database to populate the floating point array Stats with that players stats data.

3.3.2 Table 3: A complete list of methods for the Player class.



Download 471.88 Kb.

Share with your friends:
1   ...   9   10   11   12   13   14   15   16   17




The database is protected by copyright ©ininet.org 2024
send message

    Main page