Overview
My team and I have morphed the original AddressBook (Level 3) into PlanMySem for our Software Engineering project. PlanMySem is a text-based (Command Line Interface) scheduling/calendar application that caters to NUS students and staff who prefer to use a desktop application for managing their schedule/calendar efficiently. PlanMySem offers the following features and benefits:
-
Automatic creation of a planner that is synchronized to the NUS academic calendar for the current semester so you will not have to waste time manually doing so.
-
Flexible commands to facilitate easy creation, editing and deleting of items so you would enjoy a smooth experience while using the application.
-
A unique recursion system which takes into account special weeks such as recess week or reading week so as to allow you to add recurring items efficiently.
-
An intuitive tagging system for you to manage items productively.
-
Optimized for you if you prefer to work with a Command Line Interface (CLI) and/or are learning to work more efficiently with CLI tools.
-
Utilizes minimal resources on your machine while still allowing you to view your schedules swiftly.
About this Portfolio
My role was to implement the automatic synchronization of PlanMySem with the academic calendar as well as the view
feature. The following sections illustrate my implementations in more detail, as well as the relevant sections I have
contributed to the user and developer guides in relation to my implementations.
For ease of communication, this document will refer to lessons/activities/events/appointments that you might add into the planner as slots.
Throughout this portfolio, there will be various icons used as described below.
This is a tip. Follow these suggested tips to make your life much simpler when using PlanMySem! |
This is a note. These are things for you to take note of when using PlanMySem. |
Summary of contributions
This section shows a summary of my coding, documentation, and other helpful contributions to the team project.
-
Main feature: I implemented the automatic synchronization of PlanMySem with the academic calendar.
-
What it does: Upon running PlanMySem, the planner is automatically initialized and synchronized with details pertaining to the current academic semester. The current academic semester is dynamically generated based on the current date. This enhancement allows PlanMySem to function as intended; as a planner for the academics.
-
Justification: This enhancement is required as the other commands in PlanMySem, including the
view
command, rely on the proper initialization of the current academic semester for their command functionalities. The current academic semester is dynamically generated from the current date so as to ensure PlanMySem continues to work in the future. -
Highlights: This enhancement is critical to existing commands and commands to be added in future. Hence, it required an in-depth analysis of design alternatives pertaining to the aspect of academic calendar generation. The chosen implementation must be reliable indefinitely.
-
-
Minor features:
-
I added the
view
command and implemented the various types of planner views which will allow the user to view the planner in different viewing formats. -
I also enhanced the parsing for
view
command to allow for more flexibility with the command parameters.
-
-
Code contributed:
-
Please click this link to view my code contributions on RepoSense : [Contributed code]
-
Please click this link to view my contributed pull requests : [Contributed pull requests]
-
-
Other contributions:
-
Enhancements to existing features:
-
Documentation:
-
Community:
-
Contributions to the User Guide
This section includes a segment which I contributed to the User Guide and it showcases my ability to write documentation suitable for end-users. |
Links to my contributed sections in the User Guide:
- View the Planner : view / v
View the Planner : view
/ v
View the planner in a month/week/day view.
-
View the monthly calendar view of the current academic semester.
Format:view month
-
View the weekly calendar view of the current academic week.
Format:view week [WEEK]
[WEEK]
is valid if it is:-
Any number from 1 to 13 (as there is only week 1 to 13 in a semester).
-
Any of the following text (case-insensitive): recess, reading, exam, examination.
You may add in the parameter details
after[WEEK]
to view the details of all slots with respect to the[WEEK]
.
E.g.view week 13 details
will allow you to view details of all slots in week 13!
-
-
View the day view of a particular day in the academic semester.
Format:view day [DATE_OR_DAY_OF_WEEK]
[DATE_OR_DAY_OF_WEEK]
is valid if it is:-
Any number from 1 to 7 (the numbers 1 to 7 corresponds to the days Monday to Sunday respectively).
-
Any of the following text (case-insensitive): Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.
The three-letter abbreviation of the days (e.g. mon, tue) is accepted as well. -
A date in the format of "dd-mm" or "dd-mm-yyyy" (e.g. 16-04 or 16-04-2019). The date must exist in the current semester.
-
You may omit [WEEK] /[DATE_OR_DAY_OF_WEEK] to view the calendar with respect to the current date!E.g. view week will allow you to view the current week and view day will allow you to view the current day!If you have added slots to the planner, the expected output after successfully running view week will be similar to
the expected output shown in the figure below.
|
view week
The following are some examples of the view
command which you can try to run.
Month view example:
-
view month
View planner for the months of the current academic semester.
Week view examples:
-
view week details
View planner for current week of the academic calendar with details of all slots. -
view week 7
View planner for week 7 of the academic calendar. -
view week recess
View planner for recess week of the academic calendar.
Day view examples:
-
view day
View planner for the current date. -
view day 01-03-2019
View planner for the first of March. -
view day monday
View planner for the upcoming Monday.
Contributions to the Developer Guide
This section includes a segment which I contributed to the Developer Guide and it showcases my ability to write technical documentation and the technical depth of my contributions to the project. |
Links to my contributed sections in the Developer Guide:
- Initialization of the Planner and its Semester
- View feature
View feature
This feature presents the planner in different formats to the user. The available formats are the month view, week view, and the day view. This section will detail how this feature is implemented.
Current Implementation
Upon invoking the view
command with valid parameters (refer to UserGuide.adoc for view
usage),
a sequence of events is executed. For clarity, the sequence of events will be in reference to the execution
of a view month
command. A graphical representation is also included in the Sequence Diagram below for your reference
when following through the sequence of events. The sequence of events are as follows:
-
Firstly, the
view month
command is passed into theexecute
function ofLogicManager
to be parsed. -
LogicManager
then invokes theparseCommand
function ofParserManager
. -
ParserManager
in turn invokes theparse
function of the appropriate parser for theview
command which in this case, isViewCommandParser
.The view
command can be parsed into only 3 general types of views which are the month, week or day view as specified in the command parameter. -
After parsing is done,
ViewCommandParser
would instantiate theViewCommand
object which would be returned to theLogicManager
. -
LogicManager
is then able to invoke theexecute
function of the returnedViewCommand
object. -
In the
execute
function of theViewCommand
object, data will be retrieved from theModel
component (i.e. retrieving data from the currentSemester
). -
Now that the
ViewCommand
object has the data of the current semester, it is able to invoke thedisplayMonthView
method. -
With the output returned from the
displayMonthView
, theCommandResult
object will be instantiated. -
This
CommandResult
object would be returned to theLogicManager
which then returns the sameCommandResult
object back to theUI
component. -
Finally, the
UI
component would display the contents of theCommandResult
object to the user. For thisview month
command, the displayed result would be the monthly calendar view of all months in the current semester.
view month
command.
The 3 general types of view (month, week, day) are generated by the methods displayMonthView
, displayWeekView
,
displayDetailedWeekView
, displayDayView
from the ViewCommand
class and the implementation of these methods is
explained below.
displayMonthView
method displays all the months of the current semester in a monthly calendar format. Each academic week
of the semester is also indicated in the display. The implementation of this method can be
broken down into 3 parts:
-
Print month header (e.g. January 2019) and calculate required amount of whitespace before the 1st of the month.
-
Print all days of the month using a loop.
-
Append academic week after each Saturday or last day of month.
-
-
Repeat parts 1 and 2 for every month in the semester.
displayWeekView
method displays the weekly calendar format of a specified week. The implementation of this method can be
broken down into the following steps:
-
Print academic week header (e.g. Week 13 of Sem 2).
-
Retrieve all days of the week and for each day, retrieve its slots into an
ArrayList
. -
For each day, print the slot details (only start time, end time and a shortened title) and remove the slot from the
ArrayList
. -
Repeat step 3 until the
ArrayList
of slots for each day is empty.
displayDayView
method displays the details of all slots of a specified day. The implementation of this method can be
broken down into 2 parts:
-
Retrieve all slots for the specified day.
-
Print all details of each slot found.
displayDetailedWeekView
method displays the details of all slots of a specified week since displayWeekView
only shows
a formatted and summarised week view. The implementation of this method can be broken down into the following steps:
-
Print academic week header (e.g. Week 13 of Sem 2).
-
Retrieve all days of the week.
-
For each day, print all details of all slots via the
displayDayView
method.
Design Considerations
This section details our considerations for the implementation of the view
feature.
Aspect: Functionality of view week
command
-
Alternative 1 (current choice): Option for user to display a formatted summarised week view or a detailed week view.
-
Pros: The formatted summarised week view is uncluttered. User given the choice and flexibility for the week view.
-
Cons: User is required to spend a little more time to specify an additional parameter in the
view week
command.
-
-
Alternative 2: Only a single formatted week view which displays details of all slots in the specified week.
-
Pros: Efficient for the user as user is only required to enter a single command to view all details of all slots.
-
Cons: The formatted week view will be too cluttered as there are too many slots and lots of details. Formatting is an issue as well as details of each slot can be of varying lengths.
-
Alternative 1 was chosen to be implemented as it gives the user freedom of choice to select the degree of details to be
displayed in the output of the view week
command. The output of alternative 1 is also less cluttered than alternative 2
and thus enhances the presentability of PlanMySem.