The table of contents cover the sections in this Developer Guide.
AddressBook Level-3, of which we modified our application from.
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 /id A0111111N
.
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 /id A0123456N")
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., AddCommandParser
) which uses the other classes shown above to parse the user command and create a XYZCommand
object (e.g., AddCommand
) which the AddressBookParser
returns back as a Command
object.XYZCommandParser
classes (e.g., AddCommandParser
, DeleteCommandParser
, ...) 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 Note
list in the AddressBook
, which Person
references. This allows AddressBook
to only require one Note
object per unique note, instead of each Person
needing their own Note
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.address.commons
package.
This sections describes some noteworthy details on how certain features are implemented.
API : FileCommand.java
The file save feature allows users to save the current state of the address book to a specified file in the data
directory. This ensures that users can maintain multiple save files for different contexts (e.g., different classes or groups). The sequence diagram below illustrates the interactions within the system when the file /save
command is executed.
The following sequence is illustrated below.
API : FileCommand.java
The file load feature allows users to load a previously saved state of the address book from a specified file in the data
directory. This enables users to switch between different save files seamlessly. The sequence diagram below illustrates the interactions within the system when the file /load
command is executed.
The following sequence is illustrated below
API : Histogram.java
The histogram feature shows users a distribution of the grades of the students in the address book as a histogram. The sequence diagram below illustrates how the histogram gets updated when details in the address book change.
This section describes how certain features might be implemented.
Aspect: How undo & redo executes:
Alternative 1 (current choice): Saves the entire address book.
Alternative 2: Individual command knows how to undo/redo by itself.
delete
, just save the person being deleted).Target user profile:
Value proposition: Better Call TA is a contact management platform for teaching assistants to manage the details of students in their class(es) as well as relevant administrative details
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
*** | New user | See usage instructions | Refer to instructions when I forget how to use the App |
*** | TA | View my student’s contacts | Reference them when writing emails |
*** | TA | Add my student’s contact | Modify the list when a new student joins |
** | TA | Add a student without filling in all the information | Add a student without having all their details |
*** | TA | Delete my student’s contact | Modify the list if they drop the module |
** | TA | Edit my student’s contact | Change minute details as the course goes on |
** | TA | Track the attendance of a student | Mark them on participation |
* | TA | View each student’s participation | Track their participation progress in class |
* | TA | View the general grade of a student | Filter out those who may need the most help |
* | TA | Add detailed notes to student profiles | Keep track of important details |
* | TA | Keep track of additional notes regarding a student | Keep track of other information, for my needs |
** | TA | Filter my student’s contact by name | Easily find them for emergencies |
* (Epic) | TA | Sort my students according to different categories | Track their progress against certain metrics |
* | TA | Sort students by name | Arrange their names alphabetically |
* | TA | Sort students by attendance | Track which classes they have attended |
* | TA | Sort students by participation | Track how much effort they put in |
* | TA | Sort students by grades | See who needs more guidance |
** | TA | Import student contact lists | Separate student into multiple groups of teams or classes |
** | TA | Save student contact information locally | Track past student records for my reference should the need arise |
* | TA | Clear my student’s contacts | Start with a new list after every semester |
* | TA | Clear only my student’s attendance and participation | Reset them for the new week |
* | TA | Generate visual graphs of student grades | Present data clearly during meetings |
BetterCallTA
and Actor with User
, unless specified otherwise.
UC1: Add a student
MSS
User requests to add a student
BetterCallTA checks validity of provided information
BetterCallTA adds the student
Use case ends.
Extensions
1a. Not all information is given.
1a1. BetterCallTA sets fields where information is not given to their default values.
Use case ends.
2a. Student ID has incorrect format.
2a1. BetterCallTA shows an error message, specifying the correct format.
Use case ends.
2b. Phone is not NA and does not have a correct format.
2b1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
2c. Email is not NA and does not have a correct format.
2c1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
2d. Course is not NA and does not have a correct format.
2d1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
2e. Attendance is not NA and does not match any valid attendance statuses.
2e1. BetterCallTA shows an error message, specifying that the input for attendance is invalid.
Use case ends.
2f. Participation is not NA and does not match any valid participation statuses.
2f1. BetterCallTA shows an error message, specifying that the input for participation is invalid.
Use case ends.
2g. Grade is neither NA nor within the valid range.
2g1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
3a. The student cannot be added to the list.
3a1. BetterCallTA shows an error message.
Use case ends.
UC2: Delete a student
MSS
User requests to list students (UC1)
BetterCallTA shows a list of students
User requests to delete a specific student in the list
BetterCallTA deletes the student
Use case ends.
Extensions
2a. The list is empty.
3a. The given student ID is invalid.
3a1. BetterCallTA shows an error message, specifying that the student ID has an incorrect format.
Use case ends.
UC3: Edit a student
MSS
User requests to edit a student
BetterCallTA checks validity of the new details
BetterCallTA edits the student details to the new ones and displays the new student list
Use case ends.
Extensions
1a. No student ID was provided.
1a1. BetterCallTA shows an error message, specifying that the student ID must be provided.
Use case ends.
1b. No details to edit were provided.
1b1. BetterCallTA shows an error message, specifying that at least one detail should be edited.
Use case ends.
2a. Student ID has incorrect format.
2a1. BetterCallTA shows an error message, specifying the correct format.
Use case ends.
2b. Phone is not NA and does not have a correct format.
2b1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
2c. Email is not NA and does not have a correct format.
2c1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
2d. Course is not NA and does not have a correct format.
2d1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
2e. Attendance is not NA and does not match any valid attendance statuses.
2e1. BetterCallTA shows an error message, specifying that the input for attendance is invalid.
Use case ends.
2f. Participation is not NA and does not match any valid participation statuses.
2f1. BetterCallTA shows an error message, specifying that the input for participation is invalid.
Use case ends.
2g. Grade is neither NA nor within the valid range.
2g1. BetterCallTA shows an error message, specifying that the format is incorrect.
Use case ends.
3a. The edited student cannot be added to the list.
3a1. BetterCallTA shows an error message.
Use case ends.
UC4: Clear the list
MSS
User requests to clear the list
BetterCallTA checks if there are any records in the list
BetterCallTA clears the list of all records, leaving it empty
Use case ends.
Extensions
2a. The list is empty.
2a1. BetterCallTA shows an error message.
Use case ends.
UC5: Find students(s) from keywords
MSS
User requests to show students with name/id/course matching the provided keyword(s) (separated by space).
BetterCallTA checks the validity of provided keywords.
BetterCallTA shows a list composed of students, each of them having their name/id/course match at least one of the keywords.
Use case ends.
Extensions
2a. The list is empty.
2a1. An empty list is displayed.
Use case ends.
2b. The keyword(s) do not match the name/id/course of any student.
2b1. An empty list is displayed.
Use case ends.
2c. User does not provide any keywords to the command.
2c1. BetterCallTA shows an error message.
Use case ends.
UC6: Sorting the list
MSS
User requests to sort by a keyword.
BetterCallTA checks validity of the given keyword.
BetterCallTA the sorts the list by the given keyword and displays the new student list.
Use case ends.
Extensions
2a. The student list is empty.
2a1. An empty list is displayed.
Use case ends.
2b. The given keyword is invalid.
2b1. BetterCallTA shows an error message.
Use case ends.
2c. No keyword is entered.
2c1. BetterCallTA shows an error message.
Use case ends.
2d. Multiple keywords are entered.
2d1. BetterCallTA shows an error message.
Use case ends.
UC7: List all students
MSS
User requests to list all students
BetterCallTA displays all students in an ordered list.
Use case ends.
Extensions
1a. List is empty
Use case ends.
UC8: Save Data
Preconditions: BetterCallTA is running and has data to be saved.
MSS
User requests to save a file
System validates the filename
System writes the current data to the specified file
System displays confirmation message that data was saved successfully
Use case ends.
Extensions
2a. Filename is invalid.
2a1. System displays error message about invalid filename format.
Use case ends.
3a. File cannot be written (e.g., permission issues).
3a1. System displays error message about unable to save.
Use case ends.
UC9: Load Data
Preconditions: The specified save file exists and is accessible.
MSS
User requests to load a file
System validates the filename and checks if the file exists
System reads the data from the specified file
System loads the data into BetterCallTA
System displays a success message confirming the data was loaded
Use case ends.
Extensions
2a. Filename is invalid or missing.
2a1. System displays an error message about invalid filename format.
Use case ends.
3a. Specified file does not exist.
3a1. System displays error message about unable to save the file.
Use case ends.
UC10: List all Saved Files
MSS
UC11: See usage instructions
MSS
User requests to see all usage instructions
BetterCallTA displays a link to the User Guide
Use case ends.
UC12: Reset all students’ attendance and participation status
MSS
User requests to reset all attendance and participation status.
BetterCallTA sets the attendance and participation status of all students to unmarked.
BetterCallTA shows the confirmation message.
Use case ends.
Extensions
1a. The student list is empty.
1a1. BetterCallTA shows the error message specifying that the list is empty.
Use case ends.
1b. All students' statuses are already unmarked (no changes needed).
1b1. BetterCallTA shows the error message that all students' status are already unmarked.
Use case ends.
17
or above installed.Term | Definition |
---|---|
TA | Teaching Assistant - Supports the instructor in teaching a course by conducting tutorials, grading assignments, and assisting students |
CLI | Command Line Interface - Text-based interface for interacting with software |
GUI | Graphical User Interface - Visual interface with graphical elements |
NUS | National University of Singapore - Institution where this system is primarily used |
ID | Student Identification Number - Unique identifier following NUS format |
Home folder | The folder in your file system that serves as your personal storage space |
Command terminal | Powershell on Windows, Terminal on Mac and Linux |
Unicode | A text encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. |
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.
Deleting a person while all persons are being shown
Prerequisites: List all persons using the list
command. Multiple persons in the list, one with the Id
of A0237297R
and none with the Id
of A9999999R
.
Test case: delete /id A0237297R
Expected: Contact with Id
of A0237297R
is deleted from the list. Details of the deleted contact shown in the status message.
Test case: delete /id A9999999R
Expected: Assume contact with Id
of A9999999R
does not exist. No person is deleted. Error details shown in the status message.
Other incorrect delete commands to try: delete
, delete 69
,
Expected: Similar to previous
add /id A0000001R /name teststudent
/grade
flag with the edit
command.edit /id A0000001R /grade 100
delete /id A0000001R
file /save CS2103T-T10
CS2103T-T10.json
will be created in data/
directory.Exit the application with the exit
command.
Relaunch the application with java -jar BetterCallTA.jar
from the command line terminal.
file /load CS2103T-T10
CS2103T-T10.json
will be loaded.Team Size : 5
This section contains Planned Enhancements of future enhancements for BetterCallTA. This section is immune from PE bug reporting, as you should know (for us to award you your PE marks. We want to help you as well, but will not if we deem your report too unreasonable).
1. Do additional error checking in the edge case whereby there are no data save files already in the data
directory.
data
directory is empty, and the BetterCallTA will fail to load a save file until a user is added into the application. We plan to add a validation to ensure that a descriptive error message is shown to the user in this case as there is currently no feedback.2. Add additional commands for adding, deleting, and clearing of individual notes.
3. Command output box is too small
4. Detect when a flag is misspelled and display an error message for it.
/attendance
as /attendence
. Adding more detailed error messages (instead of a more general error message in our latest iteration) would allow the user to narrow down the errors in their typed command, improving their CLI experience.5. Allow deletion of save files from BetterCallTA
file /save SAVE_FILE
command. Users would need to manually delete the file on their local system if they wish to do so. In the future, we will introduce means to delete save files in the data
directory.Challenges
As a team, we did not initially realise the amount of work that the project would entail. Our proposed idea, to make an app that's suitable for TAs to use as a class management app, involved
making many small changes to the original AB3 database that rippled out and had consequences in areas of the code that we had not even thought to involve initially. For example, adding the ability to import and export
files was a uniquely challenging effort, especially when it came to handling potential data conflicts between files and parsing the commands properly. Moreover, dividing up the workload in a fair way without overloading
any single member was another issue that became apparent after realising that work which we had thought ot be more complex (such as changing the behaviour of the find
command) ended up being more simple than expected,
and other problems (such as modifying the Argument Tokenizer) took precedence due to side effects.
Achievements
For the most part, we managed to achieve almost all of our actual initial development targets, and every command you can interact with was planned in advance. We believe that BetterCallTA is usable in its current state for the target audience, and for us that is a big achievement considering the problems we faced along the way, and especially near the end.
Code Reuse
Much of AB3 has remained intact in our implementation of BetterCallTA, but crucially, our removal of tags (to better reflect the use of Student IDs) required heavy changes to the code, diagrams and test classes. Moreover, the addition of the other new attributes such as Participation, Grade, Notes etc. also marked a change in direction from the original code base which required us to come up with our own ideas. We primarily made use of existing Java and JavaFX libraries to help.