Developer Guide
- 1. Acknowledgements
- 2. Setting up, getting started
- 3. Design
- 4. Implementation
- 5. Documentation, logging, testing, configuration, dev-ops
- 6. Appendix: Requirements
-
7. Appendix: Instructions for manual testing
- 7.1 Launch and shutdown
- 7.2 Adding a friend
- 7.3 Adding a game
- 7.4 Linking a friend to a game
- 7.5 Deleting a friend
- 7.6 Deleting a game
- 7.7 Listing all friends / Filtering friends in friends’ list using a keyword
- 7.8 Listing all games / Filtering games in games’ list using a keyword
- 7.9 Viewing a friend’s full data
- 7.10 Viewing a game’s full data
1. Acknowledgements
- This project is based on the AddressBook-Level3 project created by the SE-EDU initiative.
2. Setting up, getting started
Refer to the guide Setting up and getting started.
3. Design
Tip: The .puml files used to create diagrams in this document can be found in the diagrams folder. Refer to the PlantUML Tutorial at se-edu/guides to learn how to create and edit diagrams.
3.1 Architecture

The Architecture Diagram given above explains the high-level design of gitGud.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main has two classes called Main and MainApp. It is responsible for,
- At app launch: Initializes the components in the correct sequence, and connects them up with each other.
- At shut down: Shuts down the components and invokes cleanup methods where necessary.
Commons represents a collection of classes used by multiple other components.
The rest of gitGud consists of four components.
-
UI: The UI of the gitGud. -
Logic: The command executor. -
Model: Holds application data for gitGud in memory. -
Storage: Reads data from, and writes data to, the hard disk.
How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user
issues the command friend --delete Draco.

Each of the four main components (also shown in the diagram above),
- defines its API in an
interfacewith the same name as the Component. - implements its functionality using a concrete
{Component Name}Managerclass (which follows the corresponding APIinterfacementioned in the previous point.
For example, the Logic component defines its API in the Logic.java interface and implements its functionality using the LogicManager.java class which follows the Logic interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component’s being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.

The sections below give more details of each component.
3.2 UI component
API : Ui.java
Description :
The UI component is responsible for managing the user interface of the application so that it responds correctly to any command to user inputs.
The UI component uses the JavaFX UI framework. The layout of these UI parts are defined in matching .fxml files
that are in the src/main/resources/view folder. For example, the layout of the MainWindow is specified in MainWindow.fxml
Functionality :
The UI component,
- executes user commands using the
Logiccomponent. - listens for changes to
Modeldata so that the UI can be updated with the modified data. - keeps a reference to the
Logiccomponent, because theUIrelies on theLogicto execute commands. - depends on some classes in the
Modelcomponent, as it displaysFriendandGameobjects residing in theModel.
Component Structure

The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, FriendListPanel,
GameListPanel. These parts are always being shown in MainWindow.
Depending on the state of the application, certain parts of the UI are shown and hidden in the MainWindow, e.g.
FriendMainCardTable,FriendSchedulePanel, GameMainCardTable.
etc. All these, including the MainWindow, inherit from the abstract UiPart class which captures the commonalities between classes that represent parts of the visible GUI.
3.3 Logic component
API : Logic.java
Description :
The Logic component is responsible for handling the execution of the input entered by the user. Here, the user input
is parsed to determine what command it is, before the command is executed.
Functionality :
How the Logic component works:
- When
Logicis called upon to execute a command, it uses theMainParserclass to parse the user command. - This results in a
Commandobject (more precisely, an object of one of its subclasses e.g.,HelpCommand) which is executed by theLogicManager. - The command can communicate with the
Modelwhen it is executed (e.g. to add a friend). - The result of the command execution is encapsulated as a
CommandResultobject which is returned back fromLogic.
The Sequence Diagram below illustrates the interactions within the Logic component for the execute("friend --delete draco") API call.

DeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Component Structure
Here’s a (partial) class diagram of the Logic component:

Here are the other classes in Logic (omitted from the class diagram above) that are used for parsing a user command:

How the parsing works:
- When called upon to parse a user command, the
MainParserclass creates anXYZCommandParser(XYZis a placeholder for the specific command name e.g.,HelpCommandParser) which uses the other classes shown above to parse the user command and create aXYZCommandobject (e.g.,HelpCommand) which theAddressBookParserreturns back as aCommandobject.- Note: For user commands with
friendorgameas the first arguments will go through an additionalFriendCommandParserorGameCommandParserrespectively for parsing, which will then create the respectiveXYZFriendCommandParserorXYZGameCommandParser
- Note: For user commands with
- All
XYZCommandParserclasses (e.g.,AddCommandParser,DeleteCommandParser, …) inherit from theParserinterface so that they can be treated similarly where possible e.g, during testing.
3.4 Model component
API : Model.java
Description :
The Model component is responsible for storing and managing data. It achieves this by maintaining a runtime model of
the data using Java objects that represent real-world entities and associations that simulate relationships between these entities.
Functionality :
- The
UIuses the data inside theModelto display to the user. - The
Storageuses the data inside theModelto store it on the local hard-disk. - Does not depend on any of the other three components, as it represents data entities of the domain, which should make sense on their own without depending on other components
Component Structure :

The Model component consists of the following
-
friendsubpackage- a
Friendcomprises of aFriendId,FriendName,Scheduleand a map ofGameFriendLinks. - a
Scheduleis made of 7Days, each consisting of aDayOfWeek. - stores the friends’ data i.e., all
Friendobjects in aUniqueFriendsListobject.
- a
-
gamesubpackage- a
Gamecomprises of aGameIdobject. - stores the games’ data i.e., all
Gameobjects in aUniqueGamesListobject.
- a
-
gamefriendlinksubpackage- stores the relationship between a
Friendand aGamethrough their respectiveFriendIdandGameId, as aGameFriendLinkobject. - a
GameFriendLinkcomprises of aUserNameand aSkillValue.
- stores the relationship between a
-
UserPrefobject that represents the user’s preferences. This is exposed to the outside as aReadOnlyUserPrefobject.
The Model component manages the data in the following way:

Friends:
- The Model manages a
FriendsList, which is made up of aUniqueFriendsList, which contains anObservableList<Friend>. - This
ObservableList<Friend>is wrapped inside aFilteredList<Friend>. This is to enable easy filtering of the friends list for commands like--listandrecommend. - This
FilteredList<Friend>is wrapped inside aSortedList<Friend>. This is to enable easy sorting of the friends list for commands likerecommend. - The
ObservableList<Friend>is exposed to theUIcomponent and is displayed under the ‘Friends’ section of the User interface.

Games:
- The Model manages a
GamesList, which is made up of aUniqueGamesList, which contains anObservableList<Game>. - This
ObservableList<Game>is wrapped inside aFilteredList<Games>. This is to enable easy filtering of the games list for commands like--list. - The
ObservableList<Game>is exposed to theUIcomponent and is displayed under the ‘Games’ section of the user interface.
3.5 Storage component
API : Storage.java
Description :
The Storage component is responsible for persisting application data to be stored in JSON file format and reading stored data
back into the application.
Functionality :
The storage component saves the following application data in JSON format and reads them back into corresponding objects:
- friends list
- games list
- user preferences
Component Structure :

There are 3 main model objects stored by the Storage component in JSON format, namely Friend, Game,
and UserPrefs, each stored in separate JSON files.
The Storage component inherits from FriendsListStorage, GamesListStorage and
UserPrefStorage, which means it can be treated as any one of the three.
3.6 Common classes
Classes used by multiple components are in the seedu.addressbook.commons package.
4. Implementation
- 4.1 Delete Feature
- 4.2 Link feature
- 4.3 Unlink feature
- 4.4 Schedule Feature
- 4.5 Recommend Feature
- 4.6 Get Feature
4.1 Delete Feature
4.1.1 Implementation
The MainWindow#executeCommand() calls LogicManager#execute() method, which proceeds
to call MainParser#parseCommand() method, which then calls either FriendCommandParser#parse() or
GameCommandParser#parse(), and returns a Command object.
The delete command is parsed using the following classes:
- For friends:
-
FriendCommandParser- Checks that the command contains theDeleteFriendCommand.COMMAND_WORD.- Subsequently, calls the
parse()method from a newly created instance ofDeleteFriendCommandParser.
- Subsequently, calls the
-
DeleteFriendCommandParser- Parses the command to find the string representing the friend’s ID.- The
parse()command returns aDeleteFriendCommandobject which is instantiated using the aforementionedFriendIdobject.
- The
-
DeleteFriendCommand- Represents delete friend command that is executed by gitGud.- Takes in a
FriendIdobject to find the friend to be deleted from the Model. - Due to the unique nature of the
FriendIdobjects, where no two friends have the sameFriendId, it is sufficient to search for the friend using theFriendId.
- Takes in a
-
- For games:
-
GameCommandParser- Checks that the command contains theDeleteGameCommand.COMMAND_WORD.- Subsequently, calls the
parse()method from a newly created instance ofDeleteGameCommandParser.
- Subsequently, calls the
-
DeleteGameCommandParser- Parses the command to find the string representing the game’s ID.- The
parse()command returns aDeleteGameCommandobject which is instantiated using the aforementionedGameIdobject.
- The
-
DeleteGameCommand- Represents delete game command that is executed by gitGud.- Takes in a
GameIdobject to find the game to be deleted from the Model.
- Takes in a
-
After being parsed, the implementation for deleting friends and games is similar. The Command#execute() method is
called, resulting in the deletion of a friend or a game.The following sequence diagram
illustrates the description for deleting games:

4.1.2 Design Considerations
The games of each friend is stored inside a Map<GameId, GameFriendLinks>. Before deleting a game, the links a
friend has to the game has to be removed, by calling Model#removeLinkAllFriends(Game), before deleting the game by
calling Model#deleteGame(Game). The game is then deleted from the list of games. This process is illustrated in the
sequence diagram below:

4.2 Link Feature
4.2.1 Implementation
The parsing of a link command is handled by the following classes:
-
FriendCommandParser- Checks that the command contains theLinkFriendCommand.COMMAND_WORD.- A
LinkFriendCommandParserobject is then created, from whichLinkFriendCommandParser#parse()is called.
- A
-
LinkFriendCommandParser- Parses the command to extract aFriendIdobject, aGameIdobject and aUserNameobject from the command.-
LinkFriendCommandParser#parse()returns aLinkFriendCommandobject instantiated with the aforementioned objects as parameters.
-
-
LinkFriendCommand- Represents link friend command that is executed by gitGud.- It calls
Model#linkFriend()with aFriendobject argument and aGameFriendLinkobject argument.
- It calls

The implementation of Model#linkFriend() is as follows:
-
FriendList#linkFriend()is called, which in turns calledUniqueFriendList#link(). - A new
Friendobject,friendToEditis created with the same fields asfriendToLink(the target friend of the link command).Friend#link()is then called, which modifiesfriendToEditso that it now contains the newGameFriendLink. -
UniqueFriendsList#setFriend()then replacesfriendToLinkwith the editedfriendToEdit, so that theFriendin the model is updated.

4.2.2 Design Considerations
- A separate
GameFriendLinkclass was created to represent the association between a friend and a game. - Each
Friendobject has aMap<GameId, GameFriendLink>, which represents the links to the games it is associated with. However, eachGameobject does not have a corresponding data structure to the friends it is linked to. This reduces coupling between the two components such the implementation of the link feature does not require modification whenever theGameclass is changed.
4.3 Unlink Feature
4.3.1 Implementation
The parsing of the unlink command is handled by the following classes:
-
FriendCommandParser- Checks that the command contains theUnlinkFriendCommand.COMMAND_WORD.- An
UnlinkFriendCommandParserobject is then created, from whichUnlinkFriendCommandParser#parse()is called.
- An
-
UnlinkFriendCommandParser- Parses the command to extract aFriendIdobject and aGameIdobject.-
UnlinkFriendCommandParser#parse()return anUnlinkFriendCommandobject instantiated with the aforementioned objects as parameters.
-
-
UnlinkFriendCommand- Represents unlink friend command that is executed by gitGud.- It calls
Model#unlinkFriend()with aFriendobject and aGameobject.
- It calls

The implementation of Model#unlinkFriend() is as follows:
-
FriendList#unlinkFriend()/FriendList#linkFriend()is called, which in turns calledUniqueFriendList#unlink(). - A new
Friendobject,friendToEditis created with the same fields asfriendToLink(the target friend of the unlink command).Friend#unlink()is then called, which modifiesfriendToEditso that it no longer contains a link to the game. -
UniqueFriendsList#setFriend()then replacesfriendToUnlinkwith the editedfriendToEdit, so that theFriendin the model is updated.

4.3.2 Design Considerations
- As mentioned previously in the implementation for link, the use of a separate
GameFriendLinkclass to which only theFriendclass has a reference to greatly simplifies the unlinking command as only theFriendobjects (and not theGameobjects) have to be changed.
4.4 Schedule Feature
4.4.1 Implementation
- To enable storing the schedule of a friend, two new fields had to be added:
ScheduleandDay-
Schedulecontains a list of 7Days. -
Daycontains:- an array of 24 booleans, each boolean representing a 1 hour timeslot in the day, with
truebeing free andfalsebeing busy. - the
DayOfWeek, which day of the week theDayis.
- an array of 24 booleans, each boolean representing a 1 hour timeslot in the day, with
-
- Schedule has the command format of
friend --schedule FRIEND_ID -p START_HOUR END_HOUR DAY -f IS_FREE, and as in Logic component, it will follow a similar flow of other commands, withLogicManager#execute()callingMainParser#parseCommand(), who in turn callsFriendCommandParser#parse()as it is afriendcommand, which returns aScheduleFriendCommandafter determining thecommandTypeisScheduleFriendCommand.COMMAND_WORD.

-
LogicManagerwill then callCommand#execute(). InScheduleFriendCommand, the friend to be updated will be retrieved withModel:getfriend(), and a new friend will be created withcreateScheduledFriend(), with the schedule updated and all fields mapped over to fromfriendToScheduletoscheduledFriend. -
ScheduleFriendCommandwill then callModel:setfriend()to set the updatedscheduledFriend. - Upon success, the
CommandResultis created with the success message to display on the UI and theCommandTypeofFRIEND_SCHEDULE, before being returned.

4.4.2 Design Considerations
-
ScheduleandDaywere their own classes instead of storing them directly as anArrayListorboolean[]as this would set a layer of abstraction, allowing us to change the data structure utilised to store theScheduleorDay.- Among other reasons, this also allows us to create custom methods, such as:
- custom validators when used by serialization when being mapped from the saved data in the storage.
- a method to group of adjacent 1h timeslots into a larger timeslots (e.g.
0800 - 0900and0900 - 1000will be displayed as0800 - 1000) to save space when displaying on the UI with finite space.
- Among other reasons, this also allows us to create custom methods, such as:
-
Dayonly stores 24 hourly slots as we wanted to keep data compact, and the rational is that since this is a weekly schedule, it is present to provide the user an easy way to estimate when their friends are free and thus need not be accurate to the minute. - A
Friendis initialised with all busy timeslots inDayas our targer user profile is busy and would more often be busy than free, so it would be easier for the user to just set when their friend is free.
4.5 Recommend Feature
4.5.1 Description
The recommend feature provides the user a with a command (Format: recommend -g GAME_ID -t HOUR DAY) to enter into
the gitGud text box which causes gitGud to display a list of friends who are:
- available during the specified time (hour and day) based on schedule
- are linked to the specified game
- and are ordered by the highest skill value
This command allows the user to easily find the highest-skilled available friends who play the specified game to coordinate gaming sessions with from the recommendations friends list displayed after the command is executed.
4.5.2 Implementation
To help you understand how the recommendation functionality is implemented, the activity diagram below summarises the actions gitGud undergoes to display the recommendations friends list to the user:

Step 1: Parsing and triggering recommend command execution
Similar to delete and link features above, the parse and execute actions shown in the activity
diagram are implemented via invokingRecommendCommandParser#parse(String), which extracts a specified game and timing from the
user input and constructs a RecommendCommand instance with the extracted data.
Then, the RecommendCommand#execute(model) method is invoked by an instance of the LogicManager class which uses the extracted
data to produce a list of friend recommendations to the user.
Step 2: Filtering and sorting the friends list to get recommendations friends list
The sequence diagram below illustrates what happens during the RecommendCommand#execute(model) method to produce the desired list of friend recommendations:

As shown, the recommend feature constructs an instance of FriendRecommendFilterPredicate which returns true
if the friend plays the specified game and whose schedule is available during the specified timing based on the extracted data.
It also constructs an instance of Comparator which is used to sort friends in order of the highest skill value for the specified game.
Next, the continued sequence diagram below shows the ModelManager#updateFilteredAndSortedFriendsList(Predicate, Comparator)
setting the predicate of FilteredList and comparator of SortedList instances managed by the ModelManager with
the new FriendRecommendFilterPredicate and Comparator instances, which causes filtering and sorting of the list and
produces the list of friend recommendations.

Step 3: Displaying the recommended friends
The user interface is then notified of the changes to the FilteredList and SortedList managed by the ModelManager made in Step 2
and is automatically updated to reflect the changes to the user (as explained in the Model component).
Hence, the user sees the displayed list of friend recommendations and this completes the implementation of the recommend feature.
4.5.3 Design Considerations
Aspect: How should the user be allowed to filter friends timing by?
The user is able to retrieve an ordered list by skill for friends filtered by a specified game and timing. However, our first design consideration is the format the user should use for specifying the timing to filter by.
Below are the options we could allow the user to filter by:
- Option #1: Filter by 24-hour clock and day (i.e.
1000and1to represent1000on Monday) - Option #2: Filter by minute, hour and day (i.e
0,10and1to represent1000on Monday) - Option #3: Filter by hour and day (i.e.
10and1to represent1000on Monday)
Decision
We decided to limit the filtering to by hour and day for 3 main reasons:
- to be consistent with the schedule feature which stores schedules based on hours
- we found that accuracy to the exact minute is not necessary as our target users (students) usually have weekly schedules based on hourly blocks.
- we avoided the use of the 24-hour clock as a time filter as it can also represent minutes and could potentially mislead users, since
1059seems to be a valid input but is not supported by our application which only supports schedules in hour blocks(rationale in point #2).
Hence, we specifically limited the timing filter to hour and day only.
Aspect: Implementation of sorting and filtering functionality
To implement sorting and filtering of the friends list to be displayed, we had 2 main options:
- Option #1: Implement specific sorting and filter methods at the ModelManager class, then invoke them with the specified game and timing as arguments.
- Option #2: Implement a general
ModelManager#updateFilteredAndSortedFriendsList(Predicate, Comparator)method and pass inFriendRecommendFilterPredicateandComparatorinstances as arguments.
Decision
We decided to implement predicates and comparators for the implementation of Recommend command (option #2) for two key reasons:
- Option #2 reduces the coupling between the
RecommendCommandand theModelcomponent. Since the implemented general methods such asModelManager#updateFilteredAndSortedFriendsList(Predicate, Comparator)are not dependent on the expected behaviour of Recommend, allowing us to change the Recommend feature without affecting theModelcomponent. - Option #1 mixes Recommendation and Model concerns together, leading to reduced cohesion and increased coupling, which leads to poor software design.
4.6 Get Feature
4.6.1 Description
The --get command is used to get/obtain the complete information about a Friend or Game.
4.6.2 Implementation
When called by the MainWindow#executeCommand, the LogicManager#execute method proceeds to call the MainParser#parseCommand method, which returns a Command object based on the workflow shown in the activity diagram below.

The --get command is parsed using the following classes:
- For friends:
-
FriendCommandParser- Checks that the command contains theGetFriendCommand.COMMAND_WORDi.e., ‘–get ‘. - Calls the
parse()method of a newly created instance ofGetFriendCommandParser.-
GetFriendCommandParser- Parses the command to isolate the string representing the friendId and creates aFriendIdobject with that string. - A new
GetFriendCommandobject is created with the aforementionedFriendIdobject.-
GetFriendCommand- Representsfriend --getcommand that is to be executed by gitGud. - Takes in a
FriendIdobject, used to find the friend from the Model. - Due to the unique nature of the
FriendIdobjects, where no two friends have the sameFriendId, it is sufficient to search for the friend using theFriendId.
-
-
-
- For games:
-
GameCommandParser- Checks that the command contains theGetGameCommand.COMMAND_WORDi.e., ‘–get ‘. - Calls the
parse()method of a newly created instance ofGetGameCommandParser.-
GetGameCommandParser- Parses the command to isolate the string representing the gameId and creates aGameIdobject with that string. - A new
GetGameCommandobject is created with the aforementionedGameIdobject.-
GetGameCommand- Representsgame --getcommand that is to be executed by gitGud. - Takes in a
GameIdobject, used to find the game from the Model. - Due to the unique nature of the
GameIdobjects, where no two games have the sameGameId, it is sufficient to search for the game using theGameId.
-
-
-
After the LogicManager#execute receives a GetFriendCommand or GetGameCommand based on the user input, it executes the command object using the GetXXXCommand#execute method.
An example execution of a GetFriendCommand is shown in the sequence diagram below.

GetGameCommand is executed similarly, but it deals with games and game lists.
Once a CommandResult is created with the correct Friend or Game, its passed on to the Ui, which then in turn takes care of filtering and displaying the right information of the object in focus.
-
CommandResultwith aFriendobject-
Uicreates aFriendMainCardthat displays all the information of a friend like theFriendId,Name,Scheduleand all theGameFriendLinks held in theFriendobject.
-
-
CommandResultwith aGameobject-
Uicreates aGameMainCardthat displays all the information of a game like theGameIdand a list ofFriends that play theGamein focus, along with their gaming information. - To achieve the above list of
Friends, theUihas to check all the friends if they contain aGameFriendLinkmade from theGameIdof theGamein focus, and then use it to display the gaming information likeUserNameandSkillValue.
-
5. Documentation, logging, testing, configuration, dev-ops
6. Appendix: Requirements
6.1 Product scope
Target user profile:
- Gamer who plays competitive games
- Computer Science university student
- Busy (can only play at specific times based on a weekly schedule)
- Plays multiple online competitive multiplayer games (e.g., Apex legends, Minecraft, Valorant, etc)
- Has a group of similar persona gamer friends who like him are busy with their computer science university degrees
Computer Science university student gamer who is busy but wants to keep track of equally busy friends who want to play online competitive multiplayer games together.
Value proposition:
6.1.1 Problem
For busy university student gamers who love playing multiplayer competitive games with their friends, it can often be challenging scheduling times to play games with friends out of a packed schedule. Additionally, it can be challenging to make the most out of the limited time available by choosing the right friends to play with - those you have the most fun playing with or have great performance at the game.
6.1.2 How gitGud solves the problem and make users’ lives easier
gitGud allows users to store your friends’ available timeslots and find matching times to play multiplayer competitive games together - allowing users to identify and coordinate gaming sessions with friends. It also allows users to keep track of each friend’s competitive gaming performance and rate how much fun they had gaming with a friend after each gaming session. These factors are used for gitGud to recommend and help users to decide which friends to play with for future multiplayer competitive gaming sessions.
6.2 User stories
Priorities: High (must have) - * * *, Medium (useful to have) - * *, Low (nice to have) - *
| Priority | As a (describes user) | I want to be able to (functionality) | So that I can (rationale) |
|---|---|---|---|
| *** | user | add my friends personal info/data (name, id) | store a list of friends who I can possibly play with |
| *** | user | link my friends to the games they play | associate my friends with a particular game and store their usernames for each game |
| *** | user | view a list of my friends information | see who my friends are |
| *** | user | delete a friend from the contact list | remove friends that were mistakenly added |
| *** | user | see full information of a friend from the contact list | get any information I want about the friend |
| *** | user | add games that I want to play with my friends | store the games that I plan to play with my friends |
| *** | user | view a list of my game information | see which of my friends play certain games |
| *** | user | delete a game from the games list | remove games that were mistakenly added or due to typos |
| *** | user | see full information of a game from the games list | see information about which friends play the game and their in-game usernames |
| ** | user | edit my friends name | update my friends’ name without having to recreate a friend |
| ** | user | unlink a game from a friend | remove the association between a friend and a certain game |
| ** | user | add my friends’ availabilities to my friends’ schedules | store what time they are free during the week |
| ** | user | view my friends’ availabilities in their schedules | see what time they are free during the week to play with me |
| ** | user | update my friends’ availabilities | update their availabilities should their availabilities change |
| ** | user | add my friends’ skill levels for each game | store their relative skill levels for each game that they play |
| ** | user | update my friends’ skill levels for each game | update their skill levels over time |
| ** | user | view a recommended list of friends for a game and at a certain time | find friends to play a game with me at a certain timing |
| * | user | track the match history of my friends | monitor my friends’ progress |
| * | user | store my friends’ skill levels of different genres of games | know which genre of games to play with my friend |
6.3 Use cases
(For all use cases below, the System is the gitGud and the Actor is the user, unless specified otherwise)
Use case: UC01 - Add a friend
MSS
- User requests to add a friend and specifies a
FRIEND_IDand optionally specifies aNAME. -
gitGud adds a friend into the friends list and informs user of successful addition of friend.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_IDprovided already exists and is not unique.- 1a1. gitGud informs user that it has failed to add a friend.
- 1a2. User makes another request to add a friend with a different valid and unique
FRIEND_ID. - Use case continues from step 2.
- 1b. gitGud detects that the
FRIEND_ID/NAMEprovided is invalid and does not meet specifications provided in User Guide.- 1b1. 1b1. gitGud informs user that
FRIEND_ID/NAMEprovided is invalid. - 1b2. User makes another request to add a friend with a different valid
FRIEND_ID/NAMEand uniqueFRIEND_ID. - Use case continues from step 2.
- 1b1. 1b1. gitGud informs user that
Use case: UC02 - Edit a friend
MSS
- User requests to edit a friend and specifies a
FRIEND_IDand newNAMEto update. -
gitGud updates friend and informs user of successful edit of friend.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_IDdoes not exist.- 1a1. gitGud informs user that it has no friend was found with specified
FRIEND_ID. - 1a2. User makes another request to edit a friend with a different
FRIEND_IDfor an existing friend. - Use case continues from step 2.
- 1a1. gitGud informs user that it has no friend was found with specified
- 1b. gitGud detects that the
NAMEprovided is invalid and does not meet specifications provided in User Guide.- 1b1. gitGud informs user that
NAMEprovided is invalid. - 1b2. User makes another request to edit friend with
FRIEND_IDwith a different validNAME. - Use case continues from step 2.
- 1b1. gitGud informs user that
Use case: UC03 - Delete a friend
MSS
- User requests to delete a friend using a friend’s
FRIEND_ID. -
gitGud deletes the friend from friend list and informs user of successful deletion of friend.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_IDdoes not exist.- 1a1. gitGud informs user that it has no friend was found with specified
FRIEND_ID. - 1a2. User makes another request to delete a friend with a different
FRIEND_IDfor an existing friend. - Use case continues from step 2.
- 1a1. gitGud informs user that it has no friend was found with specified
Use case: UC04 - Link a game to a friend
MSS
- User requests to link a game with
GAME_IDto a friend using withFRIEND_ID, and anIN_GAME_USERNAME. -
gitGud links the friend to the game, stores their in-game username and informs user of successful linking of friend.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_ID/GAME_IDdoes not exist.- 1a1. gitGud informs user that it has no friend/game was found with specified
FRIEND_ID/GAME_ID. - 1a2. User makes another request to link a friend with a game, with a different
FRIEND_ID/GAME_IDfor an existing friend/game. - Use case continues from step 2.
- 1a1. gitGud informs user that it has no friend/game was found with specified
- 1b. gitGud detects that the
IN_GAME_USERNAMEprovided is invalid and does not meet specifications provided in User Guide.- 1b1. gitGud informs user that
IN_GAME_USERNAMEprovided is invalid. - 1b2. User makes another request to link a friend with a game, with existing
FRIEND_IDandGAME_IDand validIN_GAME_USERNAME. - Use case continues from step 2.
- 1b1. gitGud informs user that
Use case: UC05 - Unlink a game from a friend
MSS
- User requests to unlink a game with
GAME_IDfrom a friend withFRIEND_ID. -
gitGud unlinks the friend from the game and informs user of successful unlinking of friend.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_ID/GAME_IDdoes not exist.- 1a1. gitGud informs user that no friend/game was found with specified
FRIEND_ID/GAME_ID. - 1a2. User makes another request to unlink a friend with a game, with a different
FRIEND_ID/GAME_IDfor an existing friend/game. - Use case continues from step 2.
- 1a1. gitGud informs user that no friend/game was found with specified
- 1b. gitGud detects that the
FRIEND_IDandGAME_IDlink does not exist.- 1b1. gitGud informs user that it has no friend and game link was found with specified
FRIEND_IDandGAME_ID. - 1b2. User makes another request to unlink a friend with a game, with a different
FRIEND_ID/GAME_IDfor an existing friend/game with an existing link. - Use case continues from step 2.
- 1b1. gitGud informs user that it has no friend and game link was found with specified
Use case: UC06 - Assign a skill value for a linked game to a friend
MSS
- User requests to assign a
SKILL_VALUEfor a linked game withGAME_IDto a friend withFRIEND_ID. -
gitGud assigns the friend a skill value for the linked game and informs user of successful assigning of skill value.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_ID/GAME_IDdoes not exist.- 1a1. gitGud informs user that it has no friend/game was found with specified
FRIEND_ID/GAME_ID. - 1a2. User makes another request to assign a skill value, with a different
FRIEND_ID/GAME_IDfor an existing friend/game with an existing link. - Use case continues from step 2.
- 1a1. gitGud informs user that it has no friend/game was found with specified
- 1b. gitGud detects that the
FRIEND_IDandGAME_IDlink does not exist.- 1b1. gitGud informs user that it has no friend and game link was found with specified
FRIEND_IDandGAME_ID. - 1b2. User makes another request to assign a skill value to a friend with a game, with a different
FRIEND_IDand/orGAME_IDfor an existing friend and/or game. - Use case continues from step 2.
- 1b1. gitGud informs user that it has no friend and game link was found with specified
- 1c. gitGud detects that the
SKILL_VALUEprovided is invalid and does not meet specifications provided in User Guide.- 1c1. gitGud informs user that
SKILL_VALUEprovided is invalid. - 1c2. User makes another request to assign a skill value to a friend with a game, with existing
FRIEND_IDandGAME_IDwith existing game link and validSKILL_VALUE. - Use case continues from step 2.
- 1c1. gitGud informs user that
Use case: UC07 - Schedule a friend’s availability
MSS
- User requests to update a friend’s schedule using a friend’s
FRIEND_ID, the time period (START_HOURtoEND_HOUR) of theDAYthey wish to set, as well as whether the friendIS_FREEthen. -
gitGud updates the friend’s schedule and informs user of successful scheduling of friend’s availability.
Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_IDdoes not exist.- 1a1. gitGud informs user that no friend was found with specified
FRIEND_ID. - 1a2. User makes another request to schedule a friend with a different
FRIEND_IDfor an existing friend. - Use case continues from step 2.
- 1a1. gitGud informs user that no friend was found with specified
- 1b. gitGud detects that the
START_HOUR/END_HOUR/DAY/IS_FREEprovided is invalid and does not meet specifications provided in User Guide.- 1b1. gitGud informs user that
START_HOUR/END_HOUR/DAY/IS_FREEprovided is invalid. - 1b2. User makes another request to schedule friend with
FRIEND_IDwith a different validSTART_HOUR/END_HOUR/DAY/IS_FREE. - Use case continues from step 2.
- 1b1. gitGud informs user that
Use case: UC08 - Recommend friends available to play with
MSS
- User requests to recommend friends who play a game of
GAME_ID, who are free duringHOURinDAY. -
gitGud displays a list of friends free to play with during the time specified, sorted by the friends’ skill for the game with
GAME_IDand informs user of successful recommendation of friends.Use case ends.
Extensions
- 1a. gitGud detects that the
GAME_IDdoes not exist.- 1a1. gitGud informs user that no game was found with specified
GAME_ID. - 1a2. User makes another request to recommend friends for a game with a different
GAME_IDfor an existing game. - Use case continues from step 2.
- 1a1. gitGud informs user that no game was found with specified
- 1b. gitGud detects that the
HOUR/DAYprovided is invalid and does not meet specifications provided in User Guide.- 1b1. gitGud informs user that
HOUR/DAYprovided is invalid. - 1b2. User makes another request to recommend friends for a game with
GAME_IDwith a different validHOUR/DAY. - Use case continues from step 2.
- 1b1. gitGud informs user that
Use case: UC09 - Get a friend’s complete information
MSS
- User requests for complete information about a friend of
FRIEND_ID. -
gitGud displays the complete information related to
FRIEND_IDand informs user of successful retrieval of friend information.Use case ends.
Extensions
- 1a. gitGud detects that the
FRIEND_IDdoes not exist.- 1a1. gitGud informs user that no friend was found with specified
FRIEND_ID. - 1a2. User makes another request to retrieve data of an existing friend with a different
FRIEND_ID. - Use case continues from step 2.
- 1a1. gitGud informs user that no friend was found with specified
Use case: UC10 - List/filter friends whose FRIEND_ID contains a keyword
MSS
- User requests to list friends in gitGud using a
KEYWORDfilter. -
gitGud displays a filtered list of friends whose
FRIEND_IDcontains theKEYWORDand informs user of successful listing of friends.Use case ends.
Extensions
- 1a. The user does not provide a
KEYWORD.- 1a1. All friends are listed.
- Use case ends.
Use case: UC11 - Add a game
-
MSS and Extensions similar to Add a Friend (UC1) , except it is for a game with
GAME_ID.
Use case: UC12 - Delete a game
-
MSS and Extensions similar to Delete a Friend (UC3) , except it is for a game with
GAME_ID.
Use case: UC13 - Get a game’s complete information
-
MSS and Extensions similar to Get a friend's complete information (UC09) , except it is for a game with
GAME_ID.
Use case: UC14 - List/filter games whose GAME_ID contains a keyword
-
MSS and Extensions similar to List/filter friends whose `FRIEND_ID` contains a keyword (UC10) , except it lists games whose
GAME_IDcontains theKEYWORD.
6.4 Non-Functional Requirements
- Should work on any mainstream OS as long as it has Java 11 or above installed.
- Should be able to hold up to 100 friends or games without a noticeable sluggishness in performance for typical usage.
- A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
- Does not require internet connection.
- The code should be open source.
6.5 Glossary
- Competitive Game/s: Multiplayer games with a ranking system
- Busy: Maximum of 7hrs/week to play games
- Mainstream OS: Windows, Linux, Unix, OS-X
7. Appendix: Instructions for manual testing
Given below are instructions to test the app manually.
Note: These instructions only provide a starting point for testers to work on;
testers are expected to do more exploratory testing.
7.1 Launch and shutdown
- Launching:
- Download the jar file and copy into an empty folder.
- Double-click the jar file
Expected: gitGud GUI launches.
- Shutdown:
- Run the
exitcommand in gitGud. The application should exit and shut down.
- Run the
7.2 Adding a friend
-
Prerequisites: There should not be a friend with
FRIEND_ID‘Draco’ or a friend withFRIEND_ID‘MrFeely’ already stored in gitGud. -
Test case:
friend --add Draco --name Marcus
Expected: Friend withFRIEND_ID‘Draco’ andNAME‘Marcus’ is added. gitGud states thatFRIEND_IDis added. -
Test case:
friend --add MrFeely
Expected: Friend withFRIEND_ID‘MrFeely’ and noNAMEis added. gitGud states thatFRIEND_IDis added. -
Other incorrect add commands to try:
friend --name Marcus,friend --add,friend --nameExpected: No friend is added. Error details shown in the status message. Status bar remains the same.
7.3 Adding a game
-
Prerequisites: List all games using the
game --listcommand. There should not be a game withGAME_ID‘Valorant’ already stored in gitGud. -
Test case:
game --add Valorant
Expected: Game withGAME_ID‘Valorant’ is added. gitGud states thatGAME_IDis added. -
Test case:
game --add
Expected: No game is added. Error details shown in the status message. Status bar remains the same.
7.4 Linking a friend to a game
-
Prerequisites: There exists a friend with
FRIEND_ID‘Draco’, and there exists a game withGAME_ID‘Valorant’. -
Test case:
link --friend Draco --game Valorant --user Draconian
Expected: A link between ‘Draco’ and ‘Valorant’ is created and the in-game username ‘Draconian’, is stored in this link. -
Test case:
link --game Valorant --name Draco --user Draconian
Expected: No link is added. Error details shown in the status message. Status bar remains the same. -
Test case:
link --friend Draco --game Valorant
Expected: No link is added. Error details shown in the status message. Status bar remains the same. -
Other incorrect link commands to try:
link --friend Draco --user Draconian,link --game Valorant --user Draconian,link --friendExpected: Similar to previous.
7.5 Deleting a friend
-
Prerequisites: Only one friend with
FRIEND_ID‘Draco’ exists in gitGud. -
Test case:
friend --delete Draco
Expected: Friend withFRIEND_ID‘Draco’ is deleted. gitGud states thatFRIEND_IDis deleted. -
Test case:
friend --delete MrFeely
Expected: No friend is deleted. Error details shown in the status message. Status bar remains the same. -
Other incorrect delete commands to try:
friend --deleteExpected: Similar to previous.
7.6 Deleting a game
-
Prerequisites: Only one game with
GAME_ID‘Valorant’ exists. -
Test case:
game --delete Valorant
Expected: Game withGAME_ID‘Valorant’ is deleted. gitGud states thatGAME_IDis deleted. -
Test case:
game --delete CSGO
Expected: No game is deleted. Error details shown in the status message. Status bar remains the same. -
Other incorrect delete commands to try:
game --deleteExpected: Similar to previous.
7.7 Listing all friends / Filtering friends in friends’ list using a keyword
-
Prerequisites: There exists more than one friend in gitGud, one of which has the
FRIEND_IDDraco. -
Test case:
friend --list Draco
Expected: The friend ‘Draco’ is listed, as hisFRIEND_IDcontains the keywordDraco. Other friends with the keywordDracoinside theirFRIEND_IDare also listed. -
Test case:
friend --list Dra
Expected: The friend ‘Draco’ is listed, as hisFRIEND_IDcontains the keywordDra. Other friends with the keywordDrainside theirFRIEND_IDare also listed. -
Test case:
friend --list co
Expected: The friend ‘Draco’ is listed, as hisFRIEND_IDcontains the keywordco. Other friends with the keywordcoinside theirFRIEND_IDare also listed.
7.8 Listing all games / Filtering games in games’ list using a keyword
-
Prerequisites: There exists more than one game in gitGud, one of which has the
GAME_ID‘Valorant’. -
Test case:
game --list
Expected: All games are listed. -
Test case:
game --list Valorant
Expected: The game ‘Valorant’ is listed, as itsGAME_IDcontains the keywordValorant. Other games with the keywordValorantinside theirGAME_IDare also listed. -
Test case:
game --list Valo
Expected: The game ‘Valorant’ is listed, as itsGAME_IDcontains the keywordValo. Other games with the keywordValoinside theirGAME_IDare also listed. -
Test case:
game --list ant
Expected: The game ‘Valorant’ is listed, as itsGAME_IDcontains the keywordant. Other games with the keywordantinside theirGAME_IDare also listed.
7.9 Viewing a friend’s full data
-
Prerequisites: A friend with
FRIEND_ID‘Draco’ exists in gitGud. There is no friend withFRIEND_ID‘Dra’ orFRIEND_ID‘co’. -
Test case:
friend --get Draco
Expected: The full information about friend withFRIEND_ID‘Draco’ is listed. -
Test case:
friend --get Dra
Expected: No friend is found, as there are no friends with theFRIEND_ID‘Dra’. Error details shown in the status message. Status bar remains the same. -
Test case:
friend --get co
Expected: No friend is found, as there are no friends with theFRIEND_ID‘co’. Error details shown in the status message. Status bar remains the same. -
Other incorrect get commands to try:
friend --getExpected: Similar to previous.
7.10 Viewing a game’s full data
-
Prerequisites: A game with
GAME_ID‘Valorant’ exists in gitGud. There is no game withGAME_ID‘Valo’ orGAME_ID‘rant’. -
Test case:
game --get Valorant
Expected: The full information about game withGAME_ID‘Valorant’ is listed. -
Test case:
game --get Valo
Expected: No game is found, as there are no games with theGAME_ID‘Valo’. Error details shown in the status message. Status bar remains the same. -
Test case:
game --get rant
Expected: No game is found, as there are no games with theGAME_ID‘rant’. Error details shown in the status message. Status bar remains the same. -
Other incorrect get commands to try:
game --getExpected: Similar to previous.