Part 3: CRC Cards - CMPUT301W23T21/QR-Project GitHub Wiki
A high-level overview of the main classes and their responsibilities in the QR code hunting app using CRC cards.
LandingPageActivity
| Responsibilities | Collaborators |
|---|---|
| Allows user/player to sign up to create a new account | LeaderboardActivity |
| Connects with the FireBase FireStore to store the data | QRCodeActivity |
| Views the first page of the app to the user | SignUpActivity |
| Hash | |
| FireStore |
LeaderboardActivity
| Responsibilities | Collaborators |
|---|---|
| Displays the leaderboard with scores | UserProfileActivity |
| Connects with the FireBase FireStore to store the data | QRCodeActivity |
| Displays the user's friends' scores | SignUpActivity |
| Hash | |
| FireStore | |
| Player |
QRCodeActivity
| Responsibilities | Collaborators |
|---|---|
| Scans and recognises QR codes and barcodes | LandingPageActivity |
| Hashes the scanned code and score it based on a scoring system | LeaderboardActivity |
| Takes a photo of the scanned object | Map |
| Records geolocation of the scanned code | UserHomeActivity |
| Adds the score and the hash of the scanned code to the player's account | UserProfileActivity |
| ScanActivity | |
| Player | |
| QR_Code |
QR_Code
| Responsibilities | Collaborators |
|---|---|
| Contains a Hash object, photo with geolocation, and name of the QRCode | Hash |
| Creates a map of key values of attributes to be used by DB | FireStore |
| Gets photo of the QR_Code and geolocation | QRCodeActivity |
| UserHomeActivity | |
| LeaderboardAcitvity |
Hash
| Responsibilities | Collaborators |
|---|---|
| Contains hashed string | QRCode |
| Calculates score from hashed string | |
| Generates names from hashed string |
Photo
| Responsibilities | Collaborators |
|---|---|
| Stores geolocation of the QR Code internally | QRCode |
| Shows the whereabouts of the QR Code | Scanner |
Player
PlayerAccount
| Responsibilities | Collaborators |
|---|---|
| Store player's information, including the total score, scanned QR codes, and photos locally | QRCodeScanner |
| Adds new QRCodes to its collection | Map |
| Deletes QRCodes from its collection | FireStore |
| Provide a summary of the player's activity, including the highest-scoring QR codes, the number of QR codes, and the total score | |
FireStore
| Responsibilities | Collaborators |
|---|---|
| Store player's information, including the total score, scanned QR codes, and photos | QRCodeActivity |
| Adds the new personal file(s) and QR codes to the database when being added | Map |
| Removes the QR codes from the database when being removed by the user | Player |
| Store the hash of the scanned QR codes to avoid duplicates | LandingPageActivity |
| Provide a summary of the player's activity, including the highest-scoring QR codes, the number of QR codes, and the total score | LeaderboardActivity |
| UserHomeActivity | |
| UserProfileActivity | |
Map
| Responsibilities | Collaborators |
|---|---|
| Show the location of the scanned QR codes on a map | Player |
| Show other players' activity, including their scanned QR codes and photos | QR_Code |
| Allow players to search for QR codes in a certain region |