PROJECT: UltiStudent


Overview

UltiStudent is a student application that effectively tackles the problem of having too many applications to manage their school life. To improve the quality of student life in computing, UltiStudent provides a centralised platform for them to manage their homework, cumulative average point and notes.

My role was to design and write the codes for the features in the Cumulative Average Point (CAP) manager. THe following sections of this document illustrate the enhancement i made and also

Do note the following callouts and formatting used in this document.

Callouts and Format

This callout shares note-worthy information with you. Do read them for a better understanding of the document.
This callout shares helpful tips with you. Not to worry, tips can be good to know but are not vital. Information found here are additional and can prove to be handy for you.
This callout indicates that there is worth being cautioned of. You are encouraged to the read information in here. If you are not careful, you may encounter problems.

Definitions of Terms

Across our project and documents, the term cap entry is used a lot, especially so for the CAP Manager. In our Developer Guide and Code, we use this term cap entry to refer to what the CAP Manager stores and keeps track of. This was done intentionally to avoid confusion for developers as the NotesManager and HomeworkManager of UltiStudent both store and organise documents by the module the document is for. However, we are aware that to the users, it is more intuitive to consider that the CAP manager stores modules and keep tracks of the grades of the said modules, hence in our User Guide, we describe module as what the CAP manager stores.

Summary of contributions

  • Code contributed: RepoSense

  • Major enhancement: Developed the logic, model and storage components of the CAP manager feature of UltiStudent. Which allow users to record the modules they have taken and the grades they received. This lets users keep track and forecast their CAP score.

    • What it does: CAP Manager allows users to add, delete and edit cap entries. The CAP Manager also automatically calculates the user’s CAP score whenever a change is made in the CAP manager. CAP Manager also allows users to filter through the cap entries they have taken by the semester by the find-sem command.

    • Justification: The ability to create cap entry depends on the CAP manager infrastructure. The infrastructure is a core component that of CAP manager, without which the CAP manager will fail to function. The infrastructure of the CAP manager also important to allow for future developments and extensions of the application. The commands (add-cap, edit-cap, edit-cap-mc, delete-cap, find-sem, list-cap) of CAP manager act on the model of CAP manager which are initiated and executed the logic component of CAP Manager which then interacts with the logic component of UltiStudent.

    • Highlights: This enhancement affects existing commands and commands to be added in future. This requires a thorough understanding of the starting infrastructure of the application in other to make changes to it. The implementation was challenging because I had to work within the restrictions of the of the existing application, this was especially so for the CAP calculation feature.

  • Minor enhancement:

    • Add Cap entry command that adds cap entries into the CAP Manager, which in turns updates the Module Semester list and CAP score.

    • Edit Cap entry command that edits the parameters of a cap entry, which in turns updates the Module Semester list and CAP score.

    • Delete Cap entry command that deletes the cap entry from the cap manager, which in turns updates the Module Semester list and CAP score..

    • Find Cap entry command that looks for and displays all notes in the Notes Manager.

    • List Cap entry command that lists all notes in the Notes Manager.

  • Other contributions:

    • Project management:

      • Ensured loose coupling between each manager and seamless integration of CAP manager into UltiStudent.

      • Helped to manage the issue tracker of our group repository.

      • Helped to review and merge pull requests.

    • Enhancements to existing features:

      • Wrote unit and integration tests for CAP manager’s commands and model. (Pull requests #95, #98, #158, #162)

    • Documentation:

      • User Guide

        • Wrote the features for all of CAP Manager Commands in the User Guide.

      • Developer Guide

        • Wrote the Introduction for Developer Guide.

        • Explained on how the edit-cap command works with Sequence Diagram.

        • Explained on how the delete-cap command works with Activity Diagram.

    • Community:

      • Reported bugs and suggestions for other teams in the class (examples: 111, 115, 118, 131)

    • Tools:

      • Integrated Travis CI into our repository.

      • Managed the initial set up of group repository on github.

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.

CAP Manager

Climbing to your first class honours? Or struggling to keep within your desired class? Worry no more, let CAP Manager help you with keeping count. All you need to do is to key in your grades and TADAH your CAP will be calculated for you. CAP Manager’s interface is split into a few key sections. Do refer to the image below to familiarise yourself with Cap Manager!

CapManagerInterface

Now that you’re all set, let’s see how Cap Manager can help us!

Adding a CAP entry: add-cap

Format: add-cap mc/MODULECODE g/MODULEGRADE mcs/MODULECREDITS sem/MODULESEMESTER

Let’s assume it’s the end of the semester and you just got your grades back. Simply add your modules to the Cap Manager with the add-cap command to view your updated CAP!

Parameter Input type Example

mc/MODULECODE

Module Code of the Module

mc/CS2103T

g/MODULEGRADE

Module Grade received

g/A

mcs/MODULECREDITS

Number of Modular Credits the module is worth

mcs/4

sem/MODULESEMESTER

The Semester the module was taken in

sem/Y1S1

Examples:

Let’s assume you would like to add the module, CS2101 into the CAP Manager. Given that you got B+, and that CS2101 is worth 4 Modular credits and you took the module in Year 2 Semester 2, the command to input to the Command Box would be:

  • add-cap mc/CS2101 g/B+ mcs/4 sem/Y2S2

Before adding

OpenCapManager

After entering add-cap mc/CS2101 g/B+ mcs/4 sem/Y2S2 into the command box.

AddCapManager

And just like that your CAP Manager will now include the module you just added! Your CAP score will also be updated right away! In addition, the semester list will also be updated if you are adding a module that is newly taken.

  • Unfortunately, UltiStudent’s CAP Manager does not allows U or S grade as of this version. Do look out for our next update, where we add the SU Command!

  • Currently, CAP Manager does not allow duplicate modules. Do use our edit-cap command to make changes to your grades for the case of retaking a module.

Editing a CAP Entry by index: edit-cap

Format: edit-cap INDEX [mc/MODULECODE] [g/MODULEGRADE] [mcs/MODULECREDITS] [sem/MODULESEMESTER]

If you made a mistake in entering the information for any particular CAP entry, do not worry! edit-cap command can easily fix that.

Examples:

Let’s assume you had actually gotten A+ for the module CS2101 and you took the module in Y3S1 instead.

Given this scenario, the command to input to the Command Box would be:

  • edit-cap 15 g/A sem/y3s1

Let’s put it to use!

Before editing:

AddCapManager

After editing:

EditedCapManager

Just like that, all changes you have made will be reflected straightaway in the CAP manager. This of course includes the module list, semester list and your CAP score!

  • Do note that the index entered into the command must be a positive integer 1, 2, 3, …​ up to the number of modules in the CAP Manager. In addition, do take note that at least one of the optional fields has to be provided.

Filtering a CAP entry: find-sem

Format: find-sem MODULESEMESTER …​

Here at UltiStudent, we understand that students have many modules and it can become difficult to find and filter through the many modules that they take. To help you with this, the find-sem will be handy!

Let’s say you would like to view all the modules that you took in Year 1 Semester 2. Simply type find-sem Y1S2 into the Command Box and the module list will be updated rightaway to show the modules ou took in the semester you entered!

FindCapManager
Psst..! You can use the find-sem command to view more than 1 semester of modules if you wish!
Do be careful and know that your CAP reflected in CAP indicator is still for that of all your modules. CAP indicator does not calculate your CAP score for only the displayed modules!

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.

Editing a Cap Entry : edit-cap

This feature allows the user to edit a cap entry from the cap entry list. Users can do so either via: the cap entry’s index with the edit-cap command or the cap entry’s module code with the edit-cap-mc

Current Implementation

The edit-cap command is facilitated by the Logic and Model components of the application, UltiStudent.

The sequence diagram below shows how the editing of cap entries work when the user enters edit-cap

EditCapManagerSequenceDiagram
Figure 1. Sequence Diagram for edit-cap

The sequence diagram for the "Update Module Semester" reference frame above can be seen below.

EditCapManagerSequenceDiagram2
Figure 2. Reference Frame for Update Module Semester

Given below is an example usage scenario of how edit-cap behaves at each step.

Step 1: The user launches the application and opens the CAP Manager.

Step 2: There are already existing CAP entries. The user now executes edit-cap 2 g/A sem/Y2S2 to edit the cap entry in the 2nd index with grade A and moduleSemester of Y2S2.

Step 3: Upon executing this command, the EditCapCommandParser will take in all the arguments inputted and create a EditCapCommand object. This object is then returned to the Logic Manager which will then execute the EditCommand

Step 4: When executing the EditCapCommand this alters the attributes of the CAP Entry in the UniqueCapEntryList object of UltiStudent by setCapEntry(a,b) method, where a is the cap entry to edit, and b is the edited cap entry. In doing so, this will call the method of updateCapForDelete(a) and updateCapForAdd(b), which will update the CAP score.

Step 5: Next, the UniqueModuleSemesterList will be updated. This is done by the updateModuleSemesterList(x,y) where x is the moduleSemesterOfCapEntry to edit, while y is the moduleSemesterOfEditedCapEntry.

Step 6: If moduleSemesterOfCapEntry is different from moduleSemesterOfEditedCapEntry, the model will check if it contains moduleSemesterOfEditedCapEntry. If it does not, moduleSemesterOfEditedCapEntry will be added to the UniqueModuleSemesterList.

Step 7: On the other hand, if the model does not have any cap entries with the same semesters as moduleSemesterOfCapEntry after editing the cap entries, which is reflected if hasCapEntriesWithSameSemester is false. The moduleSemesterOfCapEntryToEdit will be deleted to the UniqueModuleSemesterList.

Design Considerations

Aspect: How to store the Cap Score.
  • Alternative 1 (current choice): Store the cap score as a static variable in CapEntry class.

    • Pros: Easy to implement.

    • Cons: Since a static variable belongs to the CapEntry class, there may be unintended side effects when we use commands to modify the UniqueCapEntryList.

  • Alternative 2: Store the cap score as a separate class that is then store in UltiStudent.

    • Pros: Each versioned UltiStudent will have their own cap score.

    • Cons: Will use more memory and is harder to implement.

Aspect: How to assign score for module grade.
  • Alternative 1 (current choice): Use a Hash Map to get the Store the cap score as a static variable in CapEntry class.

    • Pros: Lower time complexity O(1) and cleaner code.

    • Cons: Larger memory occupation.

  • Alternative 2: Use switch cases to find and allocate score to grade.

    • Pros: Easier readability.

    • Cons: Slower time complexity, worst case of O(N).

Deleting a Cap Entry : delete-cap

This feature allows the user to delete a cap entry from the cap entry list. Users can do so either via: the cap entry’s index with the delete-cap command or the cap entry’s module code with the delete-cap INDEX

Current Implementation

The delete-cap command is facilitated by the Logic and Model components of the application, UltiStudent.

The activity diagram below shows how the deleting of cap entries work when the user enters delete-cap.

DeleteCapManagerActivityDiagram
Figure 3. Activity Diagram for delete-cap

Given below is an example usage scenario of how delete-cap behaves at each step.

Step 1: The user executes delete-cap 2 to delete the cap entry in the 2nd index.

Step 2: Upon executing this command, the DeleteCapCommandParser parses the arguments and checks if the arguments are valid. If not valid, the command throws an exception and terminates.

Step 3: If the argument is valid, the command checks if the CapEntry exists in the CAP Manager. If it does, the entry is deleted. The UniqueCapEntryList is then updated and the CAP score is updated as well.

Step 4: Check if after deleting the target CapEntry the UniqueCapEntryList still has a CapEntry of the same semester. If there is, the module semester will be deleted from the UniqueModuleSemesterList. Then the UniqueModuleSemesterList will be updated.

PROJECT: UltiStudent