Skip to content

Project Part 2: CRC Cards

Alex Nguyen edited this page Feb 12, 2023 · 48 revisions

Player

Responsibilities Collaborators
Keeps a username of the Player QRCode
Keeps contact information of the Player
Keeps a score of the Player
Keeps a Player's avatar as an image
Keeps total QR codes scanned by the Player
Keeps list of QRCodes a Player has scanned

PlayerActivity

Responsibilities Collaborators
Displays a list of QR codes a Player has scanned (name and photo of location) Player
Allow players to select a QR code and go to QRCodeActivity QRCode
Displays the Player's highest and lowest scores (through queries from PlayerController) PlayerController
Displays the Player's username and their avatar
Displays buttons that allow the Player to navigate to other pages

PlayerSignupActivity

Responsibilities Collaborators
Displays text fields for new players to enter their username and contact information PlayerController
Displays a button that sends the inputted username and contact information to PlayerController when clicked

PlayerDB

Responsibilities Collaborators
Creates a new Player with a username, score (initially 0), avatar, number of QRCodes scanned (initially 0), and a list of QRCodes scanned (initially empty) in the Firebase Firestore database PlayerDBConnector
Reads the values of a Player in the Firebase Firestore database Player
Updates the values of a Player in the Firebase Firestore database
Deletes a Player from the Firebase Firestore database

PlayerDBConnector

Responsibilities Collaborators
Connects to the Firebase Firestore database PlayerDB

PlayerController

Responsibilities Collaborators
Keeps a list of Players PlayerDB
Add a player to the list of Players and updates PlayerDB to reflect the changes PlayerActivity
Ensures that a new Player's username is unique Player
Updates PlayerDB by editing a Player PlayerSignupActivity
Delete a player from the list of players and updates PlayerDB to reflect the changes
Gets and keeps the most current values of every Player in the list of Players
Provides Leaderboard with a list of all players queried from PlayerDB
Sorts the list of players by total score and highest scoring QRCode
Notifies the Player class to update its values

QRCode

Responsibilities Collaborators

QRCodeEditActivity

Responsibilities Collaborators

QRCodeActivity

Responsibilities Collaborators

QRCodeDB

Responsibilities Collaborators

QRCodeDBConnector

Responsibilities Collaborators

QRCodeController

Responsibilities Collaborators

Geolocation

Responsibilities Collaborators
Keeps the GPS coordinates of a Geolocation

Map

Responsibilities Collaborators
Keeps a representation of a map Geolocation
Stores a list of QRCode geolocations QRCodeController

MapActivity

Responsibilities Collaborators
Displays a map showing QRCodes near the Player's current location MapController
Displays a search bar to allow Players to search by using geolocation Map
Allows a Player to click on a QRCode on the map to go to QRCodeActivity

MapController

Responsibilities Collaborators

Leaderboard

Responsibilities Collaborators
Keeps a sorted list of Players PlayerController

LeaderboardActivity

Responsibilities Collaborators
Display list of all users based off total score Player
Display list of all users based off highest scoring unique QRCode Leaderboard
Search bar at top to search by username for other users LeaderboardController
Display drop down menu of users below search bar after entry of username
Each user displayed is clickable

LeaderboardController

Responsibilities Collaborators

MainActivity

Responsibilities Collaborators
Displays a button that allows players to scan QRCodes
Displays buttons that allow players to navigate to other pages

Comment

Responsibilities Collaborators
Keeps the author of the comment (a player) Player
Keeps the text of the comment
Keeps the date of the comment

Clone this wiki locally