TAs often have difficulties in managing students to teams in their classes, especially if they are managing multiple classes and even modules at the same time. Due to the large number of students, TAs need to track of many nominal rolls for their classes. To effectively manage all students, a TA should have a single platform to keep track of all students, modules and classes taught. Furthermore, students may need to be grouped into various teams for assessment and group project purposes.
TA-Helper is a all-in-one desktop student contact management application for TAs to take control of the trivial student management work so that they can focus on what is most important, teaching and delivering quality content to students!
Refer to the guide Setting up and getting started.
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main (consisting of classes Main and MainApp) is in charge of the app launch and shut down.
The bulk of the app's work is done by the following four components:
UI: The UI of the App.Logic: The command executor.Model: Holds the data of the App in memory.Storage: Reads data from, and writes data to, the hard disk.Commons represents a collection of classes used by multiple other components.
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 /delete_student index/1.
Each of the four main components (also shown in the diagram above),
interface with the same name as the Component.{Component Name}Manager class (which follows the corresponding API interface mentioned 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.
The API of this component is specified in Ui.java
The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter 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.
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
The UI component,
Logic component.Model data so that the UI can be updated with the modified data.Logic component, because the UI relies on the Logic to execute commands.Model component, as it displays Person object residing in the Model.API : Logic.java
Here's a (partial) class diagram of the Logic component:
The sequence diagram below illustrates the interactions within the Logic component, taking execute("/delete_student index/1") API call as an example.
Note: The lifeline for DeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the Logic component works:
Logic is called upon to execute a command, it is passed to an AddressBookParser object which in turn creates a parser that matches the command (e.g., DeleteCommandParser) and uses it to parse the command.Command object (more precisely, an object of one of its subclasses e.g., DeleteCommand) which is executed by the LogicManager.Model when it is executed (e.g. to delete a person).Model) to achieve.CommandResult object which is returned back from Logic.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:
AddressBookParser class creates an XYZCommandParser (XYZ is a placeholder for the specific command name e.g., AddStudentCommandParser) which uses the other classes shown above to parse the user command and create a XYZCommand object (e.g., AddStudentCommand) which the AddressBookParser returns back as a Command object.XYZCommandParser classes (e.g., AddStudentCommandParser, DeleteClassCommandParser, ...) inherit from the Parser interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model component,
Person objects (which are contained in a UniquePersonList object).Person objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Person> that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.UserPref object that represents the user’s preferences. This is exposed to the outside as a ReadOnlyUserPref objects.Model represents data entities of the domain, they should make sense on their own without depending on other components)Note: An alternative (arguably, a more OOP) model is given below. It has a Tag list in the AddressBook, which Person references. This allows AddressBook to only require one Tag object per unique tag, instead of each Person needing their own Tag objects.
API : Storage.java
The Storage component,
AddressBookStorage and UserPrefStorage, which means it can be treated as either one (if only the functionality of only one is needed).Model component (because the Storage component's job is to save/retrieve objects that belong to the Model)Classes used by multiple components are in the seedu.addressbook.commons package.
This section describes some noteworthy details on how certain features are implemented.
The implemented add mechanism is facilitated by the abstract AddStudentCommand along with its specific commands AddStudentCommand, as well as the parser AddStudentCommandParser.
AddStudentCommandParser implements the Parser interface and its relevant operations.
AddStudentCommand extends the Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /add_student name/john email/john@example.com id/A1234567L tags/
Execution steps:
Step 1. The user inputs and executes /add_student name/john email/john@example.com id/A1234567L tags/ command to add a student with name john, along with
a unique email john@example.com and unique id A1234567L
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new AddStudentCommandParser and calls AddStudentCommandParser#parse(), with name/john, email/john@example.com, id/A1234567L as the arguments for the function.
Step 3. The AddStudentCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the name, email and id of the student to add.
Important Note: All fields must be specified. There must be a valid value for name, email and id. Additionally, email and id must be unique compared to the values already present in the system to get achieve a successful add. Tags here are optional and need not be specified.
Step 4. Based on the prefixes, AddStudentCommandParser creates an AddStudentCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls AddStudentCommand#execute(), passing Model as an argument. This method retrieves the student to add to the TAHelper system.
Throughout the process, error handling (e.g checking for duplicate email or id, making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the student is added to the TAHelper system.
Aspect: Modularity and extensibility:
The implemented add mechanism is facilitated by the abstract DeleteStudentCommand along with its specific commands DeleteStudentByEmailCommand, DeleteStudentByIdCommand and DeleteStudentClassByIndexCommand, as well as the parser DeleteStudentCommandParser.
DeleteStudentCommandParser implements the Parser interface and its operations.
DeleteStudentCommand extends the Command class and contains auxiliary operations that supports the mechanism, such as retrieving the target tutorial class. Each of the following commands further extends DeleteStudentCommand based on its specific functionality:
DeleteStudentByEmailCommand — Delete student based on specified email.DeleteStudentByIdCommand — Delete student based on specified student id.DeleteStudentByIndexCommand — Delete student based on specified index (viewable from the UI).Given below is an example usage scenario and how the add mechanism behaves at each step.
Format: /delete_student [id/ID] [email/EMAIL] [index/INDEX]
*Only 1 of the 3 parameters (id, email, index) must be specified
Example: /delete_student id/A0123456X
Step 1. The user executes /delete_student id/A0123456X command to delete the particular student with id A0123456X.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new DeleteStudentCommandParser and calls DeleteStudentCommandParser#parse(), with id/A0123456X as the argument.
Step 3. The DeleteStudentCommandParser parses the arguments to determine what parameter is used to specify the target student (email, index or id).
Important Note: The id/email/index must be specified. To determine the target student, only one prefix should used per command. If there are multiple prefixes, the target priority is as follows: By Index -> By Student ID -> By Email
Step 4. Based on the prefix used, DeleteStudentCommandParser creates the specific DeleteStudentCommand accordingly. Each command contains a specific predicate to find the student.
Step 5. LogicManager calls DeleteStudentCommand#execute(), passing Model as an argument. This method retrieves the student to delete using the defined predicate. Throughout the process, error handling (e.g checking for invalid student) is utilised to mitigate potential discrepancies and ensure valid execution.
Step 6. Finally, a CommandResult is created and the student is deleted.
Aspect: Modularity and extensibility:
The implemented edit mechanism is facilitated by the EditCommand and EditCommandParser. EditCommand extends the
Command class and contains auxiliary operations that support the mechanism, such as creating the edited person to replace
the target. EditCommandParser implements the Parser interface and its operations.
Given below is an example usage scenario and how the mechanism behaves at each step.
Example: /edit_student index/1 id/A1234567L
Step 1. The user executes /edit_student index/1 id/A1234567L command to edit the first student's id. The command calls
AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new EditCommandParser and calls EditCommandParser#parse(),
with index/1 id/A1234567L as the arguments.
Step 3. The EditCommandParser parses the arguments to determine which target student and parameter is being edited.
Important Note: At least one of the parameters must be present for the command to successfully return.
Step 4. EditCommandParser creates an EditPersonDescriptor, and sets the values to be edited. An EditCommand is created,
passing the EditPersonDescriptor as an argument.
Step 5. LogicManager calls EditCommand#execute(), passing Model as an argument. This method creates an editedPerson,
with all the edited information.
Important Note: Throughout the process, the method checks for duplicate persons in the Address Book. This refers to either same person, person with same email or person with same id.
Step 6. Finally, the method calls Model#setPerson, which replaces the target person with the edited person, and Model#updateFilteredPersonList()
to update the list with the new information. A CommandResult is created, informing of successful execution.
Important Note: Currently, edited student information only displays on the list it was edited in. The edited details are not propagated to other lists (students in different class/modules). More information can be found in the planned enhancements section.
Aspect: Modularity and extensibility:
Alternative 1 (current choice): Lump into one generic command that handles each parameter accordingly.
Alternative 2: Separate each specific command into a different class, while overlapping code is abstracted to an abstract class.
The implemented add mechanism is facilitated by the abstract AddStudentToClassCommand along with its specific commands AddStudentToClassByEmailCommand, AddStudentToClassByIdCommand and AddStudentToClassByIndexCommand, as well as the parser AddStudentToClassCommandParser.
AddStudentToClassCommandParser implements the Parser interface and its operations.
AddStudentToClassCommand extends the Command class and contains auxiliary operations that supports the mechanism, such as retrieving the target tutorial class. Each of the following commands further extends AddStudentToClassCommand based on its specific functionality:
AddStudentToClassByEmailCommand — Add student based on specified email to a tutorial class.AddStudentToClassByIdCommand — Add student based on specified student ID to a tutorial class.AddStudentToClassByIndexCommand — Add student based on specified index (viewable from the UI) to a tutorial classGiven below is an example usage scenario and how the add mechanism behaves at each step.
Format: /add_student_to_class [id/ID] [email/EMAIL] [index/INDEX] module/MODULE tutorial/TUTORIAL
*Only 1 of the 3 optional parameters (id, email, index) must be specified
Example: /add_student_to_class id/A0123456X module/CS2103T tutorial/T09
Step 1. The user executes /add_student_to_class id/A01234567X module/CS2103T tutorial/T09 command to add the particular student with id A01234567X to the module CS2103T and tutorial class T09.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new AddStudentToClassCommandParser and calls AddStudentToClassCommandParser#parse(), with id/A01234567X, module/CS2103T and tutorial/T09 as the arguments.
Step 3. The AddStudentToClassCommandParser parses the arguments to determine what parameter is used to specify the target student (email, index or id). Additionally, the ModuleCode and TutorialClass is determined.
Important Note: The tutorial class and module code must be specified. To determine the target student, only one prefix should used per command. If there are multiple prefixes, the target priority is as follows: By Index -> By Student ID -> By Email
Step 4. Based on the prefix used, AddStudentToClassCommandParser creates the specific AddStudentToClassCommand accordingly. Each command contains a specific predicate to find the student.
Step 5. LogicManager calls AddStudentToClassCommand#execute(), passing Model as an argument. This method retrieves the target module and tutorial class. Then, the method retrieves the student to add using the defined predicate. Throughout the process, error handling (e.g checking for invalid student/module/tutorial) is utilised to mitigate potential discrepancies and ensure valid execution.
Step 6. Finally, a CommandResult is created and the student is added to the tutorial class.
Aspect: Modularity and extensibility:
The implemented add mechanism is facilitated by the abstract DeleteStudentFromClassCommand along with its specific commands DeleteStudentFromClassByEmailCommand, DeleteStudentFromClassByIdCommand and DeleteStudentFromClassByIndexCommand, as well as the parser DeleteStudentFromClassCommandParser.
DeleteStudentFromClassCommandParser implements the Parser interface and its operations.
DeleteStudentFromClassCommand extends the Command class and contains auxiliary operations that supports the mechanism, such as retrieving the target tutorial class. Each of the following commands further extends DeleteStudentCommand based on its specific functionality:
DeleteStudentFromClassByEmailCommand — Delete student based on specified email from a tutorial class.DeleteStudentFromClassByIdCommand — Delete student based on specified student id from a tutorial class.DeleteStudentByIndexCommand — Delete student based on specified index (viewable from the UI) from a tutorial classGiven below is an example usage scenario and how the add mechanism behaves at each step.
Example: /delete_student_from_class id/A01234567X module/CS2103T tutorial/T09
Step 1. The user executes /delete_student_from_class id/A01234567X module/CS2103T tutorial/T09 command to delete the particular student with id A01234567X from the module CS2103T and tutorial class T09.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new DeleteStudentFromClassCommandParser and calls DeleteStudentFromClassCommandParser#parse(), with id/A01234567X, module/CS2103T and tutorial/T09 as the arguments.
Step 3. The DeleteStudentFromClassCommandParser parses the arguments to determine what parameter is used to specify the target student (email, index or id). Additionally, the ModuleCode and TutorialClass is determined.
Important Note: The tutorial class and module code must be specified. To determine the target student, only one prefix should be used per command. If there are multiple prefixes, the target priority is as follows: By Index -> By Student ID -> By Email
Step 4. Based on the prefix used, DeleteStudentFromClassCommandParser creates the specific DeleteStudentFromClassCommand accordingly. Each command contains a specific predicate to find the student.
Step 5. LogicManager calls DeleteStudentFromClassCommand#execute(), passing Model as an argument. This method retrieves the target module and tutorial class. Then, the method retrieves the student to delete using the defined predicate. Throughout the process, error handling (e.g checking for invalid student/module/tutorial) is utilised to mitigate potential discrepancies and ensure valid execution.
Step 6. Finally, a CommandResult is created and the student is deleted from the tutorial class.
Aspect: Modularity and extensibility:
The implementation of adding a class is facilitated by the ListStudentsOfClassCommand and ListStudentsOfClassCommandParser. ListStudentsOfClassCommandParser implements the Parser interface and it's operations. ListStudentsOfClassCommand extends the
Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /class_list_students module/CS2103T tutorial/T09
Execution steps:
Step 1. The user inputs and executes /class_list_students module/CS2103T tutorial/T09 command to list students of the unique tutorial T09 of a module CS2103T.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new ListStudentsOfClassCommandParser and calls ListStudentsOfClassCommandParser#parse(), with module/CS2103T, tutorial/T09 as the arguments for the function.
Step 3. The ListStudentsOfClassCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the students to display to the user.
Important Note: All fields must be specified. There must be a valid value for module and tutorial. Additionally, module and tutorial must match with one of the values already present in the system to get achieve a successful listing. Tags here are optional and need not be specified.
Step 4. Based on the prefixes, ListStudentsOfClassCommandParser creates an ListStudentsOfClassCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls ListStudentsOfClassCommand#execute(), passing Model as an argument. This method retrieves the module and tutorial class.
Throughout the process, error handling (e.g making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the students of a particular tutorial class of a module is listed.
Aspect: Modularity and extensibility:
The implemented search mechanism is facilitated by SearchStudentCommand and SearchStudentCommandParser.
SearchStudentCommandParser implements the Parser interface and it's operations. SearchStudentCommand extends the
Command class with the ability to update Model's filtered person list using Predicate. It supports the following
Predicate:
NameContainsKeywordPredicate — Search students based on name.EmailContainsKeywordPredicate — Search students based on email.StudentIdContainsKeywordPredicate — Search students based on student id.Given below is an example usage scenario and how the search mechanism behaves at each step.
Example: /search_student name/Bob
Step 1. The user executes /search_student name/Bob command to find students with the keyword Bob in their name.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the
arguments of the command.
Step 2. The AddressBookParser then creates a new SearchStudentCommandParser and calling
SearchStudentCommandParser#parse(), with name/Bob as the argument.
Step 3. The SearchStudentCommandParser parses the arguments to determine which prefix the user is searching in.
Note: Only one prefix can be used per command. If there are multiple prefixes, the method will throw an exception.
Step 4. SearchStudentCommandParser creates NameContainsKeywordPredicate and SearchStudentCommand, passing the predicate
as an argument into the command.
Step 5. LogicManager calls SearchStudentCommand#execute(), passing Model as an argument. This method calls
Model#updateFilteredPersonList() with the given predicate, updating the filtered list in Model with students whose
name contains Bob.
Step 6. Finally, a CommandResult is created and the new filtered is displayed to the user.
Aspect: Modularity and extensibility:
The implemented search mechanism is facilitated by SortStudentCommand and SortStudentCommandParser.
SortStudentCommandParser implements the Parser interface and it's operations. SortStudentCommand extends the
Command class with the ability to update Model's person list. SortStudentCommand supports the enumerations found
within SortStudentParameter.
Note: Unlike other commands that modify the current displayed person list using Predicate, SortStudentCommand
calls Model#getSortedPersonList(), which returns a copy of the UniquePersonList that can be sorted using
comparators.
The following are the current parameters that are supported with SortStudentCommand.
name — Sort students based on name.email — Sort students based on email.id — Sort students based on student id.Given below is an example usage scenario and how the search mechanism behaves at each step.
Example: /sort_student by/id
Step 1. The user executes /sort_student by/id command to sort student based on the value of their id.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the
arguments of the command.
Step 2. The AddressBookParser then creates a new SortStudentCommandParser and calling
SortStudentCommandParser#parse(), with by/id as the argument.
Step 3. The SortStudentCommandParser parses the arguments to determine which prefix the user is searching in.
Note: Only one input: name or email or id can be used per command. If there are multiple inputs, the method will throw an exception.
Step 4. id is parsed by SortStudentCommandParser, returning a SortStudentParameter. SortStudentCommandParser
creates SortStudentCommand and passes the new parameter as an argument.
Step 5. LogicManager calls SortStudentCommand#execute(), passing Model as an argument. A Comparator is created, passing a
function that compares by id as an argument. The execute method then calls AddressBook#getSortedPersonList() with the
given comparator, returning the sorted list in AddressBook with the sorted order of the students.
Step 6. Finally, a CommandResult is created and the sorted list of students is displayed to the user.
Aspect: Modularity and extensibility:
The implementation of adding a class is facilitated by the AddClassCommand and AddClassCommandParser. AddClassCommandParser implements the Parser interface and it's operations. AddClassCommand extends the
Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /add_class module/CS2103T tutorial/T09
Execution steps:
Step 1. The user inputs and executes /add_class module/CS2103T tutorial/T09 command to add a module CS2103T, along with
a unique tutorial T09
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new AddClassCommandParser and calls AddClassCommandParser#parse(), with module/CS2103T, tutorial/T09 as the arguments for the function.
Step 3. The AddClassCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the tutorial of the module to add.
Important Note: All fields must be specified. There must be a valid value for module and tutorial. Additionally, module and tutorial must be unique compared to the values already present in the system to get achieve a successful add. Tags here are optional and need not be specified.
Step 4. Based on the prefixes, AddClassCommandParser creates an AddClassCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls AddClassCommand#execute(), passing Model as an argument. This method retrieves the class to add to the system.
Throughout the process, error handling (e.g checking for duplicate module code or tutorial, making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the class is added to the TAHelper system.
Aspect: Modularity and extensibility:
The implementation of adding a class is facilitated by the DeleteClassCommand and DeleteClassCommandParser. DeleteClassCommandParser implements the Parser interface and it's operations. DeleteClassCommand extends the
Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /delete_class module/CS2103T tutorial/T09
Execution steps:
Step 1. The user inputs and executes /delete_class module/CS2103T tutorial/T09 command to delete a module CS2103T, along with
a unique tutorial T09
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new DeleteClassCommandParser and calls DeleteClassCommandParser#parse(), with module/CS2103T, tutorial/T09 as the arguments for the function.
Step 3. The DeleteClassCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the tutorial of the module to delete.
Important Note: All fields must be specified. There must be a valid value for module and tutorial. Additionally, module and tutorial must match with one of the values already present in the system to get achieve a successful delete. Tags here are optional and need not be specified.
Step 4. Based on the prefixes, DeleteClassCommandParser creates an DeleteClassCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls DeleteClassCommand#execute(), passing Model as an argument. This method retrieves the class to delete from the system.
Throughout the process, error handling (e.g making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the class is deleted from the module in the TAHelper system.
Aspect: Modularity and extensibility:
Alternative 2: Allow user the option to delete the entire module without specifying the tutorial class.
Alternative 3: Allow user the option to delete all classes in the module without specifying the tutorial class.
The implementation of adding a class is facilitated by the DeleteModuleCommand and DeletModuleCommandParser. DeleteModuleCommandParser implements the Parser interface and it's operations. DeleteModuleCommand extends the
Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /delete_module module/CS2103T
Execution steps:
Step 1. The user inputs and executes /delete_module module/CS2103T command to delete a module CS2103T.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new DeleteModuleCommandParser and calls DeleteModuleCommandParser#parse(), with module/CS2103T as the argument for the function.
Step 3. The DeleteModuleCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the module to delete.
Important Note: All fields must be specified. There must be a valid value for module. Additionally, module must match with one of the values already present in the system to get achieve a successful delete. Tags here are optional and need not be specified.
Step 4. Based on the prefixes, DeleteModuleCommandParser creates an DeleteModuleCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls DeleteModuleCommand#execute(), passing Model as an argument. This method retrieves the module to delete from the TAHelper system.
Throughout the process, error handling (e.g making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the module is deleted from the TAHelper system.
Aspect: Modularity and extensibility:
/delete_class. This will result in huge data loss.The implementation of adding a class is facilitated by the ListClassCommand and ListClassCommandParser. ListClassCommandParser implements the Parser interface and it's operations. ListClassCommand extends the
Command class.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /List_class
Execution steps:
Step 1. The user inputs and executes /list_class command to list all the class available.
The execute initiates the execution of the command by directly accessing the model. It begins by ensuring that the model contains data, specifically a list of modules. If the list is empty, it returns a message indicating there are no modules.
Step 2. It then iterates through each module, appending its string representation followed by a colon. Within each module iteration, it iterates through its tutorial classes, appending their string representations separated by commas.
Step 3. The result string is then trimmed and CommandResult.
Aspect: Modularity and extensibility:
The implementation of adding a class is facilitated by the AddTeamCommand and AddTeamCommandParser. AddTeamCommandParser implements the Parser interface and it's operations. AddTeamCommand extends the
Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Format: /add_team module/MODULE tutorial/TUTORIAL team/TEAM_NAME [size/SIZE]
Example: /add_team module/CS2103 tutorial/T09 team/Team 1 size/5
Execution steps:
Step 1. The user inputs and executes /add_team module/CS2103 tutorial/T09 team/Team 1 size/5 command to add a team Team 1 of size 5 to the tutorial class T09 of module CS2103T
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new AddTeamCommandParser and calls AddTeamCommandParser#parse(), with team/Team 1, size/5, module/CS2103T, tutorial/T09 as the arguments for the function.
Step 3. The AddTeamCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the team to add.
Important Note: Team name, module and tutorial must be specified with valid values. Size is an optional parameter. If size is not specified, the default size of the team is set to INTEGER.MAX_VALUE.
Step 4. Based on the prefixes, AddTeamCommandParser creates an AddTeamCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls AddTeamCommand#execute(), passing Model as an argument. Within the execution process, the method retrieves the module and tutorial from the model. Within the tutorial, the method checks if a team with the same name exists. If such a team already exists, the method will return an error.
Important Note: Two teams are considered equal if and only if they have the same team name and belong to the same tutorial class, irregardless of size.
Throughout the process, error handling (e.g checking for valid module and tutorial class, making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the team is added to the tutorial class specified.
Aspect: Robustness:
null to represent an optional team size cand tutorial class is required when adding classes into the TAHelper system, as well as user have to specify all fields, team name, module code and tutorial class in order to add a new team successfully.
The implementation of adding a class is facilitated by the DeleteTeamCommand and DeleteTeamCommandParser. DeleteTeamCommandParser implements the Parser interface and it's operations. DeleteTeamCommand extends the
Command class and contains auxiliary operations that supports the mechanism.
Given below is an example usage scenario and how the add mechanism behaves at each step.
Format: /delete_team module/MODULE tutorial/TUTORIAL team/TEAM_NAME
Example: /delete_team module/CS2103T tutorial/T09 team/Team 1
Execution steps:
Step 1. The user inputs and executes /delete_team module/CS2103T tutorial/T09 team/Team 1 command to delete a team Team 1 in tutorial T09 of module CS2103T.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new DeleteTeamCommandParser and calls DeleteTeamCommandParser#parse(), with team/Team 1, module/CS2103T, tutorial/T09 as the arguments for the function.
Step 3. The DeleteTeamCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the tutorial of the module to delete.
Important Note: All fields must be specified. There must be a valid value for module, tutorial and team, which must match with one of the values already present in the system to get achieve a successful delete. Additionally, two teams are considered equal if and only if they have the same team name and belong to the same tutorial class, irregardless of size.
Step 4. Based on the prefixes, DeleteTeamCommandParser creates an DeleteTeamCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls DeleteTeamCommand#execute(), passing Model as an argument. Within the execution process, the method retrieves the module and tutorial from the model. Thereafter, it retrieves the team from the tutorial class.
Throughout the process, error handling (e.g checking for valid module, tutorial and team, making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the team is deleted from the TAHelper system.
Aspect: Functionality:
Alternative 1 (current choice): Team size is not included in equality check of teams.
Alternative 2 : Team size is included in equality check of teams.
The implemented allocate mechanism is facilitated by the common class AllocateStudentToTeamCommand along with its specific commands AllocateStudentToTeamByEmailCommand, AllocateStudentToTeamByIdCommand and AllocateStudentToTeamByIndexCommand, as well as the parser AllocateStudentToTeamCommandParser.
AllocateStudentToTeamCommandParser implements the Parser interface and its operations.
AllocateStudentToTeamCommand extends the Command class and contains auxiliary operations that supports the mechanism, such as retrieving the target tutorial class. Each of the following commands further extends AllocateStudentToTeamCommand based on its specific functionality:
AllocateStudentToTeamByEmailCommand — Allocate student based on specified email to a team.AllocateStudentToTeamByIdCommand — Allocate student based on specified student ID to a team.AllocateStudentToTeamByIndexCommand — Allocate student based on specified index (viewable from the UI) to a team.Given below is an example usage scenario and how the add mechanism behaves at each step.
Format: /allocate_team [id/ID] [email/EMAIL] [index/INDEX] module/MODULE tutorial/TUTORIAL team/TEAMNAME
*Only 1 of the 3 optional parameters (id, email, index) must be specified.
Example: /allocate_team id/A0123456X module/CS2103T tutorial/T09 team/Team 1
Step 1. The user executes /allocate_team id/A0123456X module/CS2103T tutorial/T09 team/Team 1 command to add the particular student with ID A0123456X to team Team 1 in the tutorial class T09 of module CS2103T.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new AllocateStudentToTeamCommandParser and calls AllocateStudentToTeamCommandParser#parse(), with id/A01234567X, module/CS2103T, tutorial/T09 and team/Team 1 as the arguments.
Step 3. The AllocateStudentToTeamCommandParser parses the arguments to determine what parameter is used to specify the target student (email, index or id). Additionally, the TutorialTeam, ModuleCode and TutorialClass are determined.
Important Note: The team, tutorial class and module code must be specified. To determine the target student, only one prefix should be used per command. If there are multiple prefixes, the target priority is as follows: By Student ID -> By Email -> By Index
Step 4. Based on the prefix used, AllocateStudentToTeamCommandParser creates the specific AllocateStudentToTeamCommand accordingly. Each command contains the information it needs to add the target student into a tutorial team.
Step 5. LogicManager calls AllocateStudentToTeamCommand#execute(), passing Model as an argument. This method retrieves the target module and tutorial class. Then, the method retrieves the student to add using the defined value. Throughout the process, error handling (e.g checking for invalid student/module/tutorial/team) is utilised to mitigate potential discrepancies and ensure valid execution.
Step 6. Finally, a CommandResult is created and the student is added to the tutorial team.
Aspect: Modularity and extensibility:
The implemented random allocation mechanism is facilitated by the class RandomTeamAllocationCommand, as well as the parser RandomTeamAllocationCommandParser.
RandomTeamAllocationCommandParser implements the Parser interface and its operations.
RandomTeamAllocationCommand extends the Command class and contains auxiliary operations that supports the mechanism, such as retrieving the target tutorial class.
Format: /random_teams module/MODULE tutorial/TUTORIAL teams/NUMBER_OF_TEAMS
Example: /random_teams module/CS2103T tutorial/T09 teams/2
Step 1. The user executes /random_teams module/CS2103T tutorial/T09 teams/2 command to randomly allocate the students in tutorial class T09 of module CS2103T into 2 different teams.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new RandomTeamAllocationCommandParser and calls RandomTeamAllocationCommandParser#parse(), with module/CS2103T, tutorial/T09 and teams/2 as the arguments.
Step 3. The RandomTeamAllocationCommandParser parses the arguments to determine the parameters based on the user input. The ModuleCode, TutorialClass and NumberOfTeams are determined.
Step 4. Based on the prefix given, RandomTeamAllocationCommandParser creates a new RandomTeamAllocationCommand accordingly. Each command contains the information it needs to randomly allocate all the students in the tutorial class into different teams.
Step 5. LogicManager calls RandomTeamAllocationCommand#execute(), passing Model as an argument. This method retrieves the target module and tutorial class. Then, the method retrieves the number of teams to split the list of students into. Throughout the process, error handling (e.g checking for invalid module/tutorial/number) is utilised to mitigate potential discrepancies and ensure valid execution.
Step 6. Finally, a CommandResult is created and the list of students in the tutorial class is randomly allocated into the number of teams specified.
Aspect: Functionality:
Alternative 1 (current choice): Randomly allocates the list of students into different teams, and delete all the current existing teams in the tutorial class first before doing the allocation.
Alternative 2 : Does not delete all existing teams in the tutorial class. Instead, each time the random allocation command is run, a new set of teams is created, and stored in the tutorial class.
The implementation of viewing a team is facilitated by the ViewTeamCommand and ViewTeamCommandParser. ViewTeamCommandParser implements the Parser interface and it's operations. ViewTeamCommand extends the
Command class and displays team information based on the parameter of team passed in. It supports the following Parameters:
Name — Search and display team information based on team name.Index — Search and display team information based on index of team in the tutorial class.Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /view_teams name/Team 1 module/CS2103T tutorial/T09
Execution steps:
Step 1. The user inputs and executes /view_teams name/Team 1 module/CS2103T tutorial/T09 command to view team Team 1 of the tutorial class T09 in module CS2103T.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new ViewTeamCommandParser and calls ViewTeamCommandParser#parse(), with name/Team 1, module/CS2103T, tutorial/T09 as the arguments for the function.
Step 3. The ViewTeamCommandParser parses the arguments and get the values of the user input associated with the prefixes, from there determine the team to add.
Important Note: All fields must be specified. There must be a valid value for name, module and tutorial. Tags here are optional and need not be specified.
Step 4. Based on the prefixes, ViewTeamCommandParser creates an ViewTeamCommand object. Each command contains all the required prefixes and values to used to create the command object.
Step 5. LogicManager calls ViewTeamCommand#execute(), passing Model as an argument. This method retrieves the target team in the tutorial class of the module.
Throughout the process, error handling (e.g making sure references passed are not null) is utilised to mitigate potential errors and ensure valid execution.
Step 6. Finally, a CommandResult is created and the information of the team is displayed.
Aspect: Modularity and extensibility:
The implemented add mechanism is facilitated by the abstract DeleteStudentFromTeamCommand along with its specific commands DeleteStudentFromTeamByEmailCommand, DeleteStudentFromClassByIdCommand and DeleteStudentFromTeamByIndexCommand, as well as the parser DeleteStudentFromTeamCommandParser.
DeleteStudentFromTeamCommandParser implements the Parser interface and its operations.
DeleteStudentFromTeamCommand extends the Command class and contains auxillary operations that supports the mechanism, such as retrieving the target tutorial team. Each of the following commands further extends DeleteStudentFromTeamCommand based on its specific functionality:
DeleteStudentFromTeamByEmailCommand — Delete student from team based on specified email from a tutorial team.DeleteStudentFromTeamByIdCommand — Delete student from team based on specified student id from a tutorial team.DeleteStudentFromTeamByIndexCommand — Delete student from team based on specified index (viewable from the UI) from a tutorial team.Given below is an example usage scenario and how the add mechanism behaves at each step.
Example: /delete_student_from_team id/A01234567X module/CS2103T tutorial/T09 team/4
Step 1. The user executes /delete_student_from_team id/A01234567X module/CS2103T tutorial/T09 team/4 command to delete the particular student with id A01234567X from the module CS2103T and tutorial class T09 and team 4.
The execute command calls AddressBookParser#parseCommand(), which extracts the command word of the command and the arguments of the command.
Step 2. The AddressBookParser then creates a new DeleteStudentFromTeamCommandParser and calls DeleteStudentFromTeamCommandParser#parse(), with id/A01234567X, module/CS2103T, tutorial/T09 and team/4 as the arguments.
Step 3. The DeleteStudentFromTeamCommandParser parses the arguments to determine what parameter is used to specify the target student (email, index or id). Additionally, the ModuleCode, TutorialClass and Team is determined.
Important Note: The tutorial class, module code and team must be specified. To determine the target student, only one prefix should be used per command. If there are multiple prefixes, the target priority is as follows: By Index -> By Student ID -> By Email
Step 4. Based on the prefix used, DeleteStudentFromTeamCommandParser creates the specific DeleteStudentFromTeamCommand accordingly. Each command contains a specific predicate to find the student.
Step 5. LogicManager calls DeleteStudentFromTeamCommand#execute(), passing Model as an argument. This method retrieves the target module, tutorial class and team. Then, the method retrieves the student to delete using the defined predicate. Throughout the process, error handling (e.g. checking for invalid student/module/tutorial/team) is utilised to mitigate potential discrepancies and ensure valid execution.
Step 6. Finally, a CommandResult is created and the student is deleted from the team.
Aspect: Modularity and extensibility:
Target user profile:
Value proposition: manage students' contacts faster than a typical mouse/GUI driven app
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | Iteration | As a … | I want to … | So that I can… |
|---|---|---|---|---|
* * * | v1.2 | TA | add new students to a class | maintain an up-to-date list of enrolled students. |
* * * | v1.2 | TA | add partial info of students | still add students even if I don’t have all their information. |
* * * | v1.2 | TA | delete a student from my class if they drop the module/class | keep my class list accurate and up-to-date. |
* | v1.2 | TA | search for my students based on their NUS ID, emails, names or tutorial groups | locate details of students without having to go through the entire list |
* * * | v1.2 | TA | view all students and their particulars | have a comprehensive overview of the enrolled students that I teach. |
* * | v1.2 | TA | view all the tutorial classes and their student composition | have an overview of the classes that I am teaching. |
* * | v1.2 | TA | add a tutorial class that I am teaching. | track a tutorial class and the students in it. |
* * | v1.2 | TA | remove a tutorial class that I am teaching. | remove any unrelated classes that I do not want to no longer want to keep track of. |
* | v1.2 | TA | add students to a tutorial class | assign students to a tutorial class and teams within the class. |
* * | v1.3 | TA | edit a student's information | amend a student's detail in case there are any errors or changes. |
* | v1.3 | TA | sort students based on their name, student ID or email. | easily organise and manage student records. |
* * * | v1.3 | TA | create a new team for a tutorial class | segregate students to teams within a tutorial class. |
* * * | v1.3 | TA | delete a team from a tutorial class | remove unnecessary teams and organise my classes. |
* * * | v1.3 | TA | list all students in a particular tutorial class | see a comprehensive overview of the enrolled students in each class |
* * * | v1.3 | TA | delete a student from my class | amend if they drop the module/class. |
* * * | v1.3 | TA | search for students based on tutorial group | send tasks to students from 1 class |
* * * | v1.3 | TA | delete module from the system | remove modules I accidentally keyed in. |
* * * | v1.3 | TA | randomly generate team allocations | fairly group my students into different teams for group tasks. |
* * * | v1.3 | TA | view team composition | see a comprehensive overview of the students in each team |
* * * | v1.3 | TA | delete a student from a team | change the members of the team. |
* * * | v1.3 | TA | allocate students into teams | form teams for class projects and assignments. |
(For all use cases below, the System is the TA Helper and the Actor is the TA, unless specified otherwise)
MSS:
Extensions:
MSS:
Extensions:
MSS
Extensions:
MSS:
Extensions:
MSS:
Extensions:
MSS:
Extensions:
MSS:
Extensions:
MSS:
Extensions:
MSS
Extensions
MSS:
Extensions:
MSS:
Extensions:
MSS:
Extensions:
MSS
MSS:
Extensions:
MSS:
Extensions:
MSS:
Extensions:
MSS
Extensions
MSS
Extensions
MSS
11 or above installed.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.
Initial launch
Download the jar file and copy into an empty folder
Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
Saving window preferences
Resize the window to an optimum size. Move the window to a different location. Close the window.
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
Adding a new person into the TAHelper system.
Prerequisites: NIL.
Test case 1: Entering /add_student name/Dohn Joe email/johndoe@gmail.com id/A0123456A for the first time
Expected: A new student is successfully added into the TAHelper system.
Test case 2: Entering /add_student name/Dohn Joe email/johndoe@gmail.com id/A6543210A with the same email
Expected: An error message displayed. A person with the same email cannot be added because a student with the same email already exist in the TAHelper system.
Test case 3: /add_student name/Dohn Joe email/johndoe@gmail.com id/0123
Expected: An error message is displayed as the input id value is invalid.
Test case 4: /add_student name/john email/john@gmail.com id/A9876543A tag/Tutee
Expected: A new student is successfully added into the TAHelper system.
Deleting a person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
Test case: delete 0
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
Other incorrect delete commands to try: delete, delete x, ... (where x is larger than the list size)
Expected: Similar to previous.
Allocating a student to a team in the tutorial class by studentId, email or index that they belong to in the tutorial class list.
Prerequisites:
To set up these prerequisites: visit [] to add student into tutorial class, and visit [] to add tutorial team into the tutorial class.
Test case 1 (Allocating by student id): /allocate_team id/A9876543A module/CS2101 tutorial/T02 team/Team1
Expected: Student successfully added to Team1 of tutorial T02.
Test case 2 (Allocating by email) (Assuming Test case 1 is not executed on the same person): /allocate_team email/Jared@example.com module/CS2101 tutorial/T02 team/Team1
Expected: Student successfully added to Team1 of tutorial T02.
Test case 3 (Allocating a student that is not in that tutorial group): /allocate_team id/A1111111Z module/CS2101 tutorial/T02 team/Team1
Expected: An error message is displayed indicating that the student needs to be in the tutorial group first.
Test case 4 (Allocating a student that is not in the TAHelper system): /allocate_team id/A0987654A module/CS2101 tutorial/T02 team/Team1
Expected: An error message is played indicating that the student is not in TAHelper system.
Team size: 5
Current implementation
/delete_all_classes module/MODULE command.Proposed enhancement(s)
/delete_all_classes command could be implemented to help support this feature. This is different from /delete_module as this command deletes the module itself too, but /delete_all_classes would leave the module itself intact.Current implementation
T01). This could result in errors when trying to use a valid tutorial class name (such as DTk1234's TO43 or CS2101's SG15)Proposed enhancement(s)
TO43), 1 letter + 1 digit (e.g. T5)Current implementation
@ symbol is present, and does not check if a valid domain has been entered.Proposed enhancement(s)
.com format for the wider public or the u.nus.edu.sg format for example, is specified in the context of NUS students.Current implementation There are many instances where the error messages have confused users. For example,
Team before the team name, which might confuse the user on whether the team name is 1 or Team 1, for example.Proposed enhancement(s)
Current implementation
Proposed enhancement(s)
Current implementation
/edit_student, changes only appear on the list currently being displayed.Proposed enhancement(s)
/edit_student command, such that it will propagate any changes made on a single student list to
all other lists within the app. This allows for syncing of information across the different modules, tutorial classes and teams.Current implementation
Proposed enhancement(s)
Current implementation
Proposed enhancement(s)
Current implementation
Proposed enhancement(s)