1. About the Project
My team and I were tasked with enhancing a basic command line interface addressbook for our
Software Engineering project. We chose to morph it into a project management system for software engineering project managers.
This enhanced application allows managers to keep track of employees and projects under his/her management.
My role was to design and write the codes for the Statistics feature(with the Stats
command). The following sections
illustrate these enhancements in more detail, as well as the relevant sections I have added to the
user and developer guides in relation to these enhancements.
Note the following symbols used in this document:
Legend | Meaning |
---|---|
|
A grey highlight (called a mark-up) indicates that this is a command that can be inputted into the command line and executed by the application or indicates a component, class or object in the architecture of the application. |
The note pad icon indicates any useful tips or things that users need to take note of while using the Pocket Project application. |
|
The light bulb icon indicates any shortcuts that users can use while using the Pocket Project application. |
|
The exclamation mark icon indicates any warnings that users can take note of while using the Pocket Project application. |
|
The graduation cap icon indicates any advanced usages or extra technical information about how a particular command works should the users be interested to know. |
2. Summary Of Contributions
This section shows a summary of my coding, documentation, and other helpful contributions to the team project.
-
Enhancement added: I added the feature to be able to have an overview of all the ongoing projects and also the individual progress overview of individual projects.
-
What it does: There are two ways to use it. When only the
stats
command is keyed in without arguments, an overview of all projects is given. When the command is followed by a project name or an index (e.g.stats 1
,stats Project Apollo
), it returns an overview of the progress of the project. -
Justification: Our app is targeted at project managers managing many projects and it would be inconvenient for them to look through the long lists of employees and projects to get the large picture of all the projects they are managing, that is why we have overview for all projects. Individual project progress helps the manager to gauge the progress of individual projects so that they can adjust their plans accordingly.
-
Highlights: This enhancement is very extensible and more useful statistics can be displayed if they are supported by the underlying data model.
-
Credits:
-
Teammates for fixing typos here and there in the documentations.
-
There was originally a implementation section in the developer guide for the
stats
command by Daryl Tan, I have modified and extended it to its present state. -
My teammate Jothi is the one who came up with the icons used in the documentations. *
-
-
-
Other contributions:
-
Coding
-
Implementation of the part of the
removefrom
command which allows removal of employees or milestones from projects(Pull Request [#79]). -
Implementation of the
delete
command which allows the deletion of projects from the app. Refactored thedelete
command of the original address book to one which deletes employees. (Pull Request [#39]) -
Implementation of the
complete
command which allows indication of projects as completed.
-
-
Project Management
-
Set up Travis Continuous Integration and Coverall
-
-
Team Contributions
-
Find and report bugs and suggest possible enhancements which can be done in the team’s issue tracker. [#82]
-
-
Community Contributions
-
3. Contributions to the User Guide
You can view these sections to see my contributions to the User Guide documentation for removefrom employee
, removefrom milestone
command, complete
command and stats
command.
The part on the delete
command is excluded due to insufficient space, please go to [User Guide Section 4.5 -delete command] if you are interested.
3.1. Remove an employee from a project: removefrom PROJECT_NAME employee
Removing an employee from a project.
Format: removefrom PROJECT_NAME employee EMPLOYEE_INDEX
Examples:
-
view project 1
click on the right arrowhead till the page showing the list of employees in the project
removefrom p1 employee 1
Removes the employee at first position at displayed list of employees from the project 'p1'. The effect of the command is demonstrated in the two figures above.
3.2. Remove a milestone from a project: removefrom PROJECT_NAME milestone
Removing a milestone from a project.
Format: removefrom PROJECT_NAME milestone MS_INDEX
Examples:
-
view project Apollo
removefrom Apollo milestone 1
Removes the milestone at 1st position of displayed list of milestone from Project Apollo.
Removes the employee at the specified |
|
The index must be a positive integer and cannot be larger than the size of the list. |
3.3. To indicate the project has been completed : complete
Indicates that a project is completed. Currently this command has similar effect to deleting the project, but it is meant to support the enhanced statistics feature for V2.0.
Format: complete PROJECT_INDEX COMPLETION_DATE
Examples:
-
list projects
The list of ongoing projects are listed.complete 1 11/11/2011
The first project in the shown list is indicated as completed on 11/11/2011.
3.4. Display statistics regarding the projects : stats
Returns an overview of all ongoing projects/the progress of an individual project.
Format: stats
or stats PROJECT_NAME
/stats PROJECT_INDEX
+ add something here. Examples:
stats
Number of ongoing projects: 5
Projects with deadline in this month:
------------------------
1. Project6 | deadline: 17/04/2019|reached 0 out of 1 milestones
------------------------
2. Project2 | deadline: 17/06/2019|reached 1 out of 1 milestones
3. Project3 | deadline: 17/06/2019|reached 1 out of 1 milestones
4. Project1 | deadline: 17/05/2019|reached 0 out of 1 milestones
5. Project4 | deadline: 17/05/2019|reached 0 out of 0 milestones
stats 1
Progress of p1:
deadline: 29/04/2019 | reached 0 out of 1 milestones
Milestones not reached yet:
1. Finish userguide | deadline: 28/04/2019 | 0 out of 1 tasks completed.
4. Contributions to the Developer Guide
You can view this section to see my contributions to the Developer Guide documentation which consists of the implementation of the removefrom feature(only the parts on employees and milestones, others are added by my teammates) and stats feature and also several sections on manual testing Pocket Project (which unfortunately there is no space to include in here, so check out this link if you’re interested! [Manual testing, sections G2, G7-G11, G14-G21).
4.1. Remove employee/milestone/project task/user story from projects feature
4.1.1. Current Implementation
The removing of employee,milestone or user story from projects is facilitated by the model component of the PocketProject. This feature currently supports these three commands:
-
removefrom [project name] employee [employee index]
— removes the employee at index[employee index]
in the list of employees in the project named[project name]
. -
removefrom [project name] milestone [milestone index]
— removes the milestone at index[milestone index]
in the list of milestones in the project named[project name]
. -
removefrom [project name] projecttask [milestone index] [project task index]
— removes the project task at index[project task index]
in the list of tasks under the milestone specified by[milestone index]
in the project named[project name]
. -
removefrom [project name] userstory [userstory index]
— removes the user story at index[userstory index]
in the list of user stories in the project named[project name]
.
These operations are supported by the methods in the Model
interface: Model#removeEmployeeFrom(Project, Employee)
, Model#removeMilestoneFrom(Project, Milestone)
, Model#removeProjectTaskFrom(Project, Milestone, ProjectTask)
and Model#removeUserStoryFrom(Project, UserStory)
.
The methods does not take in indices as arguments since the corresponding Employee, Milestone, ProjectTask or UserStory object associated with the Project object would be found by RemoveEmployeeFromCommand#excute()
, RemoveMilestoneFromCommand#execute()
, RemoveProjectTaskFromCommand#execute()
or RemoveUserStoryFromCommand#execute()
before the methods of Model
are called.
The sequence diagram for the execution of the removing of employee from a project is as follows, the sequence for the removal of milestone, project tasks and user stories are similar:
removefrom Apollo employee 1
.Given below is an example usage scenario and how the removal of employee/milestone/project task/user story feature behaves at each step.
Step 1. The user enters the command view project Apollo'. The app displays the list of employees and milestones in the project named "Apollo" by executing the `view
command.
Step 2. The user enters removefrom Apollo employee 1
. The LogicManager
passes the entered string to the PocketProjectParser
. The PocketProjectParser
parses the string received and identifies the command as falling under the class of RemoveFromCommand
(which constitutes of RemoveEmployeeFromCommand
and RemoveMilestoneFromCommand
by the removefrom
keyword and passes the rest of the string to the RemoveFromCommandParser
to identify which type of RemoveFromCommand
is being executed and what are the arguments.
The RemoveFromCommandParser
then creates command object and passes it to the LogicManager
to be executed. The command execution will check the validity of the arguments and then call the methods of the Model
component to remove the corresponding objects.
Step 3. The user executes 'removefrom Apollo milestone 2'. The execution of this command is similar to step 2, just that the type of object changes from Employee
to Milestone
.
The |
4.1.2. Design Considerations
Aspect: How the command string (e.g. removefrom Apollo employee 1
) is parsed
Alternative 1: Let PocketProjectParser
handle the whole string and construct the command.
Alternative 2: Having 2 parsing stages where the PocketProjectParser
identify that the command string is trying to execute a RemoveFromCommand
from the removefrom
key word, then passes
the rest of the string to another specialized RemoveFromCommandParser
. (current implementation)
Using alternative 2 is better as it provides better abstraction as the details of the 2 different types of RemoveFromCommand
will be hidden away, hence it is more in line with OOP principles.
There will also be less clutter in PocketProjectParser
as there are already a lot of other commands being parsed.
4.2. Stats feature
4.2.1. Implementation
The displaying of statistics in Pocket Project will be facilitated by the model component. This feature is planned to support 2 main commands:
-
stats
— Displays an overview of all the projects: the number of ongoing projects, deadlines etc. -
stats PROJECT_INDEX
orstats PROJECT_NAME
— Display a summary of the progress of the project with the given PROJECT_INDEX or PROJECT_NAME.
The operation will be supported by the methods in the Model
interface: Model#overallStats()
and Model#individualStats(Project)
.
Model#overallStats()
will retrieve the data on all the projects/employees to pass to StatsUtil
, an utility class to produce a string which describes
the status of all projects. Model#individualStats(Project)
passes the given project to StatsUtil
to produce a string in a similar fashion.
The following sequence diagrams show how the stats command will work:
Overview of all projects:
stats
stats 1
Usage Scenario example for stats
:
-
User executes
stats
/stats PROJECT_INDEX
/stats PROJECT_NAME
to view project statistics in Pocket Project. -
PocketProjectParser
will parse and identify the command as aIndividualStatsCommand
orOverallStatsCommand
, parse any additional argument accordingly and return the command object. -
LogicManager
then executes the returned command, calling theModel#individualStats()
orModel#overallStats(Project)
accordingly to obtain the string describing the status of concern. -
The returned string is used to construct the result of the command.
4.2.2. Design Considerations
Aspect: How the string is constructed.
Alternative 1: Retrieve all the relevant project(s), find out the relevant information and construct the string in the execute()
method
of the command object.
Alternative 2: Do the construction in the model.
Alternative 3: Do it somewhere else.
I have decided to use alternative 3 and create a specialized helper class to scrap the relevant information from the list of projects/employees to produce the string. This is chosen because I have decided to have several helper methods to construct the different parts of the string(e.g. about the number of ongoing projects, project with closest deadline etc..). It would be inappropriate to put these methods under the command class or the model because they are not very related.