Skip to content

Commit

Permalink
Merge pull request #219 from samuellleow/basicLoggingOfFeatures
Browse files Browse the repository at this point in the history
Basic logging of features
  • Loading branch information
shreytheshreyas authored Nov 9, 2020
2 parents 86f86a8 + 69ed5ce commit d51ae4d
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ The following sequence diagram shows how the “Hours Worked by worker” comman

<center><img src="https://i.ibb.co/7Qms8Hc/hours.png"></center>

### **Removing a member (Sean Tan)**
This command allows project managers to remove members from the main members list.
### **Removing a member from Home View(Sean Tan)**
This command allows project managers to remove members from the main members list in the home view.

The logic for this command is primarily written in TeamMemberDeleteCommand class. It extends from the abstract Command class.

Expand All @@ -455,13 +455,34 @@ Step 1: The Parser initializes TeamMemberDeleteCommand by passing a hashmap of i

Step 2: The Parse() method of the TeamMemberDeleteCommand class extracts the index of the member to be deleted from the parameter hashmap.

Step 3: The ExecuteCommand() method of TeamMemberDeleteCommand class is called by Duke main class, which passes it the program’s arraylist of members.
Step 3: The ExecuteCommand() method of TeamMemberDeleteCommand class is called by EzManager main class, which passes it the program’s arraylist of members and arraylist of projects.

* The method remove(memberIndex) of the teamMembers arraylist is called, removing the member.
Step 4: TeamMember is removed from the arraylist of TeamMember in the entire program.

Step 5: Loop through each project in the arraylist of Project and remove member from the arraylist of TeamMember if it is present.

Step 6: While still in the Project, loop through each task in the arrayList of Task in the and remove member from the arraylist of TeamMember from each task if it is present.

* The Ui class prints an acknowledgement that the member has been removed.

<center><img src="https://i.ibb.co/Lz9FQZC/Figure17.png"></center>
### **Removing a member from Project View(Samuel Leow)**
This command allows project managers to remove members from the project in the project view.

The logic for this command is primarily written in TeamMemberDeleteCommand class. It extends from the abstract Command class.

The steps below show how such a class is initialized and used to execute the command.

Step 1: The Parser initializes TeamMemberDeleteCommand by passing a hashmap of input parameters together with memberIndex that was provided by the user using `remove m/1` into its constructor.

Step 2: The Parse() method of the TeamMemberDeleteCommand class extracts the index of the member to be deleted from the parameter hashmap.

Step 3: The ExecuteCommand() method of TeamMemberDeleteCommand class is called by EzManager main class, which passes it the program’s arraylist of members and arraylist of projects.

Step 4: TeamMember is removed from the arraylist of TeamMember in the current project.

Step 5: Loop through each task in the arraylist of Task and remove member from the arraylist of TeamMember from each task if it is present.

* The Ui class prints an acknowledgement that the member has been removed.

---

Expand Down

0 comments on commit d51ae4d

Please sign in to comment.