Golden Knights Recruit Manager - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Golden Knights Recruit Manager

Description:

second number - string. City - string. State - string. Zip code int. Mother's name - string ... String city; String state; String zipcode; String phoneNumber; ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 18
Provided by: dansp4
Category:

less

Transcript and Presenter's Notes

Title: Golden Knights Recruit Manager


1
Golden Knights Recruit Manager
  • Josh Newell
  • Bill Bushey
  • Dan Spencer
  • Mike Ellison

2
Player Personal data
  • Name - string
  • Age - int
  • Gender - char
  • Height - int
  • Weight - int
  • Team - string
  • Position - string
  • Rank - char
  • Address - string
  • Email - string
  • Phone number - string
  • second number - string
  • City - string
  • State - string
  • Zip code int
  • Mothers name - string
  • Fathers name - string

3
Game Data
  • Want - int
  • Size - int
  • Skating - int
  • Quickness - int
  • Strength - int
  • Handling - int
  • Offensive awareness - int
  • Defensive awareness - int
  • Checking - int
  • Toughness - int
  • Scout name - string
  • Date of game - string

4
Data Invariants
  • Age, height, weight are non-negative numbers
  • Rank and gender are a single letter
  • All game data field except the date and scout
    name are a number from 1-10

5
playerData class
  • Class that holds a players personal data
  • private
  • String firstName
  • String lastName
  • char middleInitial
  • String streetAddress
  • String city
  • String state
  • String zipcode
  • String phoneNumber
  • String cellPhoneNumber
  • String email
  • String fathersName
  • String mothersName
  • String team
  • String position
  • Date dob
  • int height
  • int weight

6
playerData functions
  • Player data will hold functions to access all of
    its private data
  • The list of all these functions, and their pre
    and post conditions are in the word document
    playerData.doc

7
Other playerData related functions
  • Precondition The player newPlayer doesnt
    already exist in the database.
  • Postcondition The player newPlayer is in the
    database.
  • /Adds the provided player object to the
    database./
  • public boolean addPlayer(Player newPlayer)
  • Precondition The player editedPlayer already is
    in the system.
  • Postcondition The entry for editiedPlayer is
    updated with new information.
  • /Updates the provided player by finding the
    existing entry in the database and updating it
    with the provided player object./
  • public boolean updatePlayerInfo(Player
    editedPlayer)

8
Other playerData related functions
  • Precondition The player aPlayer exists in the
    database.
  • Postcondition The player aPlayer remains
    unchanged, the screen displays aPlayers
  • information.
  • /Generates an on-screen display of information
    about the provided player./
  • public void viewPlayer(Player aPlayer)
  • Precondition The player oldPlayer exists in the
    database.
  • Postcondition The database no longer contains
    the player oldPlayer.
  • /Deletes the provided player from the
    database./
  • public Boolean deletePlayer(Player oldPlayer)

9
gameData
  • Public class gameData_c(
  • Private
  • Bool want
  • int Size
  • int Skating
  • int quickness
  • int strength
  • int handling
  • int offensiveAwareness
  • int defensiveAwareness
  • int checking
  • int toughness

10
gameData
  • Public /Pre all values must have a value,
    Post values are unchanged/
  • Bool getWant(void)
  • int getSize(void)
  • int getSkating(void)
  • int getQuickness(void)
  • int getStrength(void)
  • int getHandling(void)
  • int getOffensiveAwareness(void)
  • int getDefensiveAwareness(void)
  • int getChecking(void)
  • int getToughness(void)

11
gameData
  • /Prevalues being passed must be from 0-5 for
    ints and either true or false for the bool. Post
    values are changed to passed in value/
  • void setWant(bool)
  • void setSize(int)
  • void setSkating(int)
  • void setQuickness(int)
  • void setStrength(int)
  • void setHandling(int)
  • void setOffensiveAwareness(int)
  • void setDefensiveAwareness(int)
  • void setChecking(int)
  • void setToughness(int)

12
gameData
  • /Adds a the game object to the database/
  • Public Boolean addGame( gameData_c game)
  • Pregame doesnt exist in database
  • Post game is in database
  • /Updates the provided game object in the
    database/
  • Public Boolean addGame( gameData_c game)
  • PreGame exists in database
  • Post game is still in database
  • /Opens a window to view the given game object/
  • Public void viewGame( gameData_c game)
  • Pregame exists
  • Post game is unchangedin database
  • /delets the game object in the database/
  • Public Boolean deleteGame( gameData_c game)
  • Pregame exists in database
  • Posgame is not in database

13
User Object
  • Contains fields Username, Password, Admin
  • Username/Password strings holding any
    combination of letters, numbers, symbols between
    6 and 20 characters can not be null
  • Admin boolean value to flag whether or not the
    user is an administrator
  • Declarations
  • String Username
  • String Password
  • Boolean Admin

14
User Object Functions
  • public String getUsername() returns username
  • Pre-Condition there must be users in the
    database
  • Post-Condition Username is returned if it exists
  • public String getPassword() returns password
  • Pre-condition users exists in the database
  • Post-condition password is returned
  • public boolean isAdmin() returns true if admin,
    false otherwise
  • Pre-condition users exists in the database
  • Post-condition true or false is returned

15
User Object Functions
  • public void addUser() will ask the user for new
    username, password, and whether or not this user
    will be an admin
  • Pre-conditions there is enough space in the
    database/hard drive for another entry, the user
    adding a new user is an admin
  • Post-conditions a new user is added to the
    database, properly formatted
  • public void changePassword() will ask the user
    to enter in their old password, then the new
    password twice (to ensure no mistakes)
  • Pre-conditions the user is logged in
  • Post-conditions the new password is sent to the
    database and the user account is updated

16
Other Functions
  • public void Search() will display a page asking
    the user the fill in the fields they want to
    search by, will then query the database, and will
    then call the display function to display the
    data
  • Pre-conditions there is data in the database to
    search
  • Post-conditions data will be displayed to the
    screen if any data matches the criteria
  • public void Sort() will sort the data based on
    specific criteria that is clicked from the
    display screen
  • Pre-conditions user has data displayed on the
    screen
  • Post-conditions data is sorted (ascending or
    descending) then is redisplayed
  • public void Display (String query) will take in
    a query and display data the data the is returned
  • Pre-conditions there is data in the database to
    display
  • Post-conditions data matching the query is
    displayed on the page

17
Interface class
  • Holds functions to display various forms out to a
    browser
  • Pre-condition for all functions User is logged
    in, the system is up and running
  • Post-condition Specified page is displayed to
    the screen
  • Public void addPlayerForm()
  • Public void addGameForm()
  • Public void deletePlayerForm()
  • Public void editPlayerForm()
  • Public void editGameForm()
  • Public void addUserForm()
  • Public void searchForm()
  • Public void sortForm()
  • Public void changePasswordForm()
  • Public void mainForm()
Write a Comment
User Comments (0)
About PowerShow.com