PROJECT: Trajectory


Overview

Trajectory is a lightweight management system for those who need a no-frills solution for managing students, modules, grades, classes and notes. It is built for users who prefer typing (CLI) over GUI interaction and has a GUI created with JavaFX.

Summary of contributions

  • Code Contributed: https://nuscs2113-ay1819s1.github.io/dashboard/#=undefined&search=tristyxxnana

  • Major enhancement: added the ability to display a graph command for student grades

  • Minor enhancement: Added features for Gradebook Management and Grade Management

    • Gradebook Management (Create, Find, Update, Delete, List Gradebook Component)

    • Grade Management (Create, Delete, List Student Grade)

  • Other contributions:

    • Project management:

      • Managed documentation-related files (User Guide, Developer Guide) in pull request on GitHub.

    • Enhancements to existing features:

      • Wrote additional tests for existing features to increase coverage(Pull requests #149, #175)

    • Documentation:

      • Did modifications to existing contents of the About Us, Developer Guide and User Guide: #38, #47

    • Community:

      • PRs reviewed (with non-trivial review comments): #127, #226, #234, #238

      • Reported bugs and suggestions for other teams in the class: #90, #92, #108, #109

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Gradebook Management

Add Gradebook Component : gradebook add

Creates a grade item to a module code.
Format: gradebook add mc/MODULE_CODE cn/COMPONENT_NAME [mm/MAX_MARKS] [w/WEIGHTAGE]

  • Inputs are case sensitive.

  • Gradebook component name must NOT exist in existing module.

Examples:

  • gradebook add mc/CS2113 cn/Assignment 1 mm/60
    Adds gradebook component, Assignment 1 with maximum marks of 60, to module CS2040C.

Edit Gradebook Component : gradebook edit

Edits a gradebook item.
Format: gradebook edit mc/MODULE_CODE cn/COMPONENT_NAME [ei/EDITED_COMPONENT_NAME] [mm/EDITED_MAX_MARKS] [w/EDITED_WEIGHTAGE]

  • Inputs are case sensitive.

  • Grade component name must exist in existing module.

  • Accumulated weightage including the updated weightage must not exceed 100%.

Examples:

  • gradebook edit mc/CS2113 cn/Assignment 1 en/Finals
    Updated component name for CS2040C Assignment 1 to Finals.

  • gradebook edit mc/CS2113 cn/Assignment 1 mm/60 w/50
    Updated maximum marks and weightage of Assignment 1 in CS2113 to 60 and 50% respectively.

Remove Gradebook Component : gradebook delete

Removes a gradebook item to a module code.
Format: gradebook delete mc/MODULE_CODE cn/COMPONENT_NAME

  • Inputs are case sensitive.

  • Grade component name must exist in existing module.

Examples:

  • gradebook delete mc/CS2113 cn/Assignment 1
    Deletes Assignment 1 from module CS2113.

Find Gradebook Component : gradebook find

Finds gradebook component.
Format: gradebook find mc/MODULE_CODE cn/COMPONENT_NAME

  • Inputs are case sensitive.

  • Grade component name must exist in existing module.

Examples:

  • gradebook find mc/CS2113 cn/Assignment 1
    Finds Assignment 1 to module CS2113.

List Gradebook Components : gradebook list

Lists all the gradebook items in a certain module.
Format: gradebook list

Examples:

  • gradebook list
    Lists all the gradebook items found in Trajectory.

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Logic component

TrajectoryLogicClassDiagram
Figure 1. Structure of Trajectory Logic Component

API : Logic.java

  1. Logic uses the AddressBookParser class to parse the user command.

  2. This results in a Command object which is executed by the LogicManager.

  3. The command execution can affect the Model (e.g. deleting a gradebook component) and/or raise events.

  4. The result of the command execution is encapsulated as a CommandResult object which is passed back to the Ui.

Given below is the Sequence Diagram for interactions within the Logic component for the execute("gradebook delete mc/CS2113 cn/Assignment 1") API call.

GradebookDeleteSDForLogic
Figure 2. Interactions Inside the Logic Component for the gradebook delete mc/CS2113 cn/Assignment 1 Command

Gradebook Graph feature

Current Implementation

The gradebook graph mechanism is an enhancement that will be released in the later versions, facilitated by 'Trajectory'. It is stored internally in GradebookManager.

Additionally, it implements the following operations:

  • gradebookManager#graphModuleSummary() — Converts data of all student grades from Array List to graph form

  • gradebookManager#graphStudentProgress() — Converts student data to present progress on module.

These operations are exposed in the GradebookManager as GradebookManager#graphModuleSummary(), GradebookManager#graphStudentProgress() respectively.

Given below is an example usage scenario and how the gradebook data-to-graph mechanism behaves at each step.

Step 1. The user launches the application for the first time. The StorageController which interacts with #xmlAdaptedGradebook to retrieve data from Array List using #retrieveData.

Step 2. The user executes gradebook find mc/cs2113 cn/Finals command to find the relevant gradebook component. The find command calls GradebookManager#findGradebookComponent(), which finds and filters the Array List to the relevant search.

Step 3. The user executes gradebook graph student. GradebookManager#graphStudentProgress will convert the Array List to graph form and display to the user.

If a command fails its execution, it will not call Gradebook#GradebookManager(), so Trajectory state will not be saved into the GradebookManager.

Step 4. The user now decides to export graph according to the progress of a student, and that action is done by executing the gradebook graph student command. This command will call GradebookManager#graphStudentProgress(), which then displays the graph of the students progress.

The following activity diagram summarizes what happens when a user executes grade graph command:

GradeGraphActivityDiagram

Design Considerations

Aspect: How graph-to-data executes
  • Alternative 1 (current choice): Individual command knows how to export accordingly.

    • Pros: Will use less memory (e.g. only execute command when needed)

    • Cons: Parameters and prefixes must be entered correctly before running command.

  • Alternative 2: Saves the entire Trajectory.

    • Pros: Easy to implement.

    • Cons: Might result in low performance due to high memory usage.

Aspect: Data structure to support the data-to-graph commands
  • Alternative 1 (current choice): Use a list to store the data before exporting.

    • Pros: Easy data structure to use for any graph.

    • Cons: Large list of data might require significant memory.

  • Alternative 2: Use `GradebookManager' for data-to-graph export

    • Pros: We do not need to maintain a separate list, and just reuse what is already in the codebase.

    • Cons: Requires dealing with commands that needs to interact with storage controller or xml adapters directly but command should not have direct interaction from StorageController.

Use case: Add Gradebook Component

Precondition(s) :

  • Gradebook component name NOT exist in existing module.

  • Accumulated weightage for gradebook components in module cannot exceed 100%.

Guarantees : NIL

MSS :

  1. Teacher creates gradebook component.

  2. System indicates success message.

    Use case ends.

Extensions :

  • 2a. Teacher enters an invalid command.

    • 2a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 2b. Teacher enters the wrong parameter prefix.

    • 2b1. System displays the correct format for the command.

      Use case resumes at step 1.

Use case: Update Gradebook Component

Precondition(s) :

  • Gradebook component name must exist in existing module.

  • Accumulated weightage including the updated weightage must not exceed 100%.

  • At least one optional parameter must be included in command.

Guarantees : NIL

MSS :

  1. Teacher updates gradebook component.

  2. System indicates success message.

    Use case ends.

Extensions :

  • 1a. System detects an error in the entered data.

    • 1a1. System displays message and format corresponding to error.

    • 1a2. Teacher enters new data.

      Steps 1a1-1a2 are repeated until the data entered is correct.

      Use case resumes from step 1.

Use case: Remove Gradebook Component

Precondition(s) :

  • Gradebook component name must exist in existing module.

Guarantees :

  • Deleting gradebook component will also delete any student marks associated to it.

MSS :

  1. Teacher removes gradebook component.

  2. System indicates success message.

    Use case ends.

Extensions :

  • 2a. Teacher enters an invalid command.

    • 2a1. System displays the list of valid commands.

      Use case resumes at step 1.

Use case: Find Gradebook Component

Precondition(s) :

  • Gradebook component name must exist in existing module.

Guarantees : NIL

MSS :

  1. Teacher finds gradebook component.

  2. System displays details on selected gradebook component.

    Use case ends.

Extensions :

  • 1a. Teacher enters an invalid command.

    • 1a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 1b. Teacher enters the wrong parameter prefix.

    • 1b1. System displays the correct format for the command.

      Use case resumes at step 1.

Use case: List Gradebook Components

Precondition(s) :

  • Gradebook component name must exist in existing module.

Guarantees : NIL

MSS :

  1. Teacher lists gradebook component.

  2. System displays list.

    Use case ends.

Extensions :

  • 1a. System detects an error in the entered data.

    • 1a1. System displays message and format corresponding to error.

      Use case resumes from step 1.