Overview
This portfolio documents my contribution to Mod Manager, a software engineering project that my team of 4 and I have built under the module, CS2103T Software Engineering. Over the span of 8 weeks, Mod Manager is morphed from Address Book Level 3 (AB3) and it aims to assist students in managing schedules and facilitators' contact details for their modules in a semester. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 25 kLoC.
Below are some relevant contributions I have made to the development of Mod Manager.
Summary of Contributions
This section shows a summary of my contributions to Mod Manager.
Major enhancement:
-
Implemented the calendar feature
-
What it does:
-
Allows users to view their schedules for the current week and upcoming week.
-
Allows users to find time periods where the user will be free.
-
-
Justification: This feature improves the product because users may need a better visualisation of the many tasks and classes they have in each day in a week and know the time periods where they are free. This then allows users to better plan their schedules.
-
Highlights: This enhancement has some dependency on other features. It required an in-depth analysis of design alternatives. The implementation is hard because the calendar has to be updated whenever classes and tasks are updated due to other commands.
-
Minor enhancement:
-
Sorted the facilitators in facilitators list by their name in alphabetical order.
-
Design and implement the Ui for module tab.
Code contributed:
Other contributions:
-
Project management:
-
Managed releases
v1.3
on GitHub -
Merged pull requests
-
-
Documentation:
-
Community:
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. |
Calendar feature : cal
The commands in this section carry out operations related to the calendar in Mod Manager. Executing these commands will bring you to the Calendar tab.
Viewing calendar for current week (Lu Shing)
You can view the calendar for the current week. It displays the tasks and classes you have in the current week.
Format:
-
cal view /week this
Example:
After typing cal view /week this
, the calendar for the current week will be displayed to you as shown below.
The red cards represent the tasks you have not done, the green cards represent the tasks you have already done and the blue cards represent the classes you have in the current week.
cal view /week this
Viewing calendar for next week (Lu Shing)
You can view the calendar for next week. It displays the tasks and classes you have in the next week.
Format:
-
cal view /week next
Example:
After typing cal view /week next
, the calendar for the next week will be displayed to you as shown below.
The red cards represent the tasks you have not done, the green cards represent the tasks you have already done and the blue cards represent the classes you have in next week.
cal view /week next
Finding empty slots (Lu Shing)
You can find the empty slots from current day to end of the week of the current day. The empty slots are time periods where you do not have classes or tasks.
Format:
-
cal find empty
Example:
You can get the list of empty slots after typing cal find empty
. The list will be displayed in the result display box as seen below.
The command will not change the week of the calendar you are viewing.
cal find empty
The full message in the result display box in the above figure is:
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. |
Model Component
Module (Lu Shing)
-
The
Module
package contains a concrete classModule
. -
A
Module
contains aModuleCode
and aDescription
of the module. -
A
UniqueModuleList
comprises of instances ofModule
.
Calendar Feature
The calendar feature manages the calendar in Mod Manager and is represented by the Calendar class. A calendar has a LocalDate.
It supports the following operations:
-
view
- Views the schedules and tasks in a whole week in Mod Manager. -
find
- Finds empty slots in a week from current day to end of the week in Mod Manager.
Implementation Details
Viewing the calendar (Lu Shing)
The view calendar feature allows users to view the calendar for a week in Mod Manager.
This feature is facilitated by CalCommandParser
, CalViewCommandParser
and CalViewCommand
. The calendar is exposed in the Model
interface in Module#updateCalendar()
and it is retrieved in MainWindow
to show the timeline for the specified week to users.
Given below is an example usage scenario and how the calendar view mechanism behaves at each step:
-
The user executes the calendar view command and provides which week to be viewed. The week to be viewed can be this or next week.
-
CalViewCommandParser
creates a newCalendar
based on the specified week. -
CalViewCommandParser
creates a newCalViewCommand
based on theCalendar
. -
LogicManager
executes theCalViewCommand
. -
ModelManager
updates the calendar inModelManager
. -
MainWindow
retrieves the calendar fromLogicManager
which retrieves fromModelManager
. -
MainWindow
shows the calendar.
The following sequence diagram shows how the calendar view command works:
cal view
Command
The lifeline for CalCommandParser , CalViewCommandParser and CalViewCommand should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of the diagram.
|
The following activity diagram summarizes what happens when a user executes a calendar view command:
cal view
CommandFinding empty slots in calendar (Lu Shing)
The find empty in calendar feature allows users to know the empty slots they have in the calendar from the current day to the end of the week in Mod Manager. This feature is facilitated by CalCommandParser
, CalFindCommandParser
and CalFindCommand
.
Given below is an example usage scenario and how the calendar find mechanism behaves at each step:
-
The user executes the calendar find command.
-
CalFindCommandParser
creates a newCalFindCommand
. -
LogicManager
executes theCalFindCommand
.
Design Considerations
Aspect: Calendar appearance
-
Alternative 1 (current choice): Displaying the days of a week in calendar from left to right.
-
Pros: The whole week can be seen on one screen without having users to scroll down for a particular day.
-
Cons: Words that are long in number of characters may not be able to be displayed in a single line.
-
-
Alternative 2: Displaying the days of a week in the calendar from top to bottom.
-
Pros: Tasks and schedules that have description that are long can be displayed in a single line.
-
Cons: There is a need for users to scroll down to see a particular day. If there are many tasks and schedules in a day, the other days after it will be pushed downwards and this requires even more scrolling for users.
-
Alternative 1 is chosen as it is better that people are able to see their whole schedules and tasks for a week in one look. It makes better use of space than alternative 2 where the right side is usually not used.
Aspect: Command syntax for calendar find command
-
Alternative 1 (current choice): User is required to input
cal find empty
.-
Pros: It is short in command length.
-
Cons: Since there is only one type of calendar find,
empty
may seem redundant.
-
-
Alternative 2: User is required to input
cal find /type empty
.-
Pros: With the need to input
/type
, it can be clear about the type of find the command is trying to do. This is because without the/type
, it is possible that users thought that the command is finding the wordempty
. -
Cons: It can be tedious for users to type
/type
and this increases the command length.
-
Alternative 1 is chosen because it is shorter than alternative 2 and hence it can be easier for users to type.
It is easier to implement too. The word empty
is kept to allow users to know what the find command is for.
Appendix C: Use Cases
Use case: UC25 - View calendar
-
1. User requests to view the calendar for a specified week.
-
2. Mod Manager shows the calendar for the specified week.
Use case ends.
-
1a. The specified week is invalid.
-
1a1. Mod Manager shows an error message.
Use case resumes from step 1.
-
Use case: UC26 - Find empty slots in calendar
-
1. User requests to find empty slots in the calendar.
-
2. Mod Manager shows the list of empty slots available.
Use case ends.
-
1a. The given input is invalid.
-
1a1. Mod Manager shows an error message.
Use case resumes from step 1.
-
-
2a. The list of empty slots is empty.
Use case ends.
Appendix E: Glossary
- CLI
-
Command-line interface: processes commands to a computer program in the form of lines of text.
- MSS
-
Main Success Scenario: describes the most straightforwards interaction for a given use case, which assumes that nothing goes wrong.
- Extensions
-
"Add-on"s to the MSS that describe exceptional or alternative flow of events, describe variations of the scenario that can happen if certain things are not as expected by the MSS.
- GUI
-
Graphical user interface: a form of user interface that allows user to interact with electronic devices through graphical icons.
Testing of Calendar Feature
-
Viewing the calendar.
-
Prerequisites: The classes and tasks with date within the current week exist.
-
Test case:
cal view /week this
Expected: Classes and tasks appear in the correct day in the calendar and sorted according to time. -
Test case:
cal view /week that
Expected: Error message shown in the result display. -
Other incorrect cal view commands to try:
cal view
,cal view /week
Expected: Similar to previous.
-