Skip to content

Commit 46d0e44

Browse files
authored
Merge pull request nus-cs2103-AY2021S1#107 from gabztcr/gabriel-developer-guide-implementation
Add Overall Completion Percentage feature to DG Implementation
2 parents 6227a24 + 2779c80 commit 46d0e44

File tree

4 files changed

+101
-1
lines changed

4 files changed

+101
-1
lines changed

docs/DeveloperGuide.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,39 @@ The following sequence diagram shows how the view operation works:
261261
* Pros: Does not require an additional operation to fetch the item in view.
262262
* Cons: Inappropriate use of Command Result whose primary objective is to pass feedback to the user.
263263

264+
### \[Proposed\] Overall Completion Percentage feature
265+
266+
#### Proposed Implementation
267+
268+
The Overall Completion Percentage (OCP) feature is to be implemented in the Dashboard page (coming soon) of *Productiv*.
269+
This feature allows users to have a quick overview of the progress of their product's development. OCP is given by the
270+
formula*:
271+
272+
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
273+
*OCP (%) = Number of Completed Deliverables / Total Number of Deliverables × 100*
274+
</div>
275+
276+
\* If no deliverables are present, OCP will be set to **0%**.
277+
278+
The OCP will only be updated upon successful execution of the following (simplified) commands:
279+
* AddCommand, i.e. *add(deliverable)*
280+
* DoneCommand, i.e. *done(deliverable)*
281+
* DeleteCommand, i.e. *delete(deliverable)*
282+
283+
The following proposed sequence diagram shows how the updating of the OCP would be implemented:
284+
285+
![OCPSequenceDiagram](images/OCPSequenceDiagram.png)
286+
287+
#### Design consideration:
288+
289+
##### Aspect: How updating of OCP executes
290+
291+
* **Alternative 1 (current choice):** Store the deliverable counters within `LogicDeliverableManager`.
292+
* Pros: Adheres to Single Responsibility Principle.
293+
* Cons: May require additional interfaces/methods to retrieve the required values for OCP computation.
294+
* **Alternative 2:** Store the deliverable counters as global variables.
295+
* Pros: Directly accesses the required values for OCP computation.
296+
* Cons: May violate Single Responsibility Principle.
264297

265298

266299
--------------------------------------------------------------------------------------------------------------------

docs/UserGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ traditional GUI apps.
2020

2121
1. Ensure you have Java `11` or above installed in your computer.
2222

23-
1. Download the latest `Productiv.jar`. [Coming Soon]
23+
1. Download the latest `Productiv.jar` from [here](https://github.com/AY2021S1-CS2103T-F11-2/tp/releases).
2424

2525
1. Copy the `.jar` file to your preferred folder.
2626

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@startuml
2+
!include style.puml
3+
4+
box Model MODEL_COLOR_T1
5+
participant ":DeliverableModel" as Mod MODEL_COLOR
6+
end box
7+
8+
box Logic LOGIC_COLOR_T1
9+
participant ":TotalNumDeliverables" as Total LOGIC_COLOR
10+
participant ":NumCompletedDeliverables" as Com LOGIC_COLOR
11+
participant ":OCP" as OCP LOGIC_COLOR
12+
end box
13+
14+
[-> Mod: add(deliverable)
15+
activate Mod
16+
Mod -> Total : add(1)
17+
activate Total
18+
Total -> OCP : update()
19+
activate OCP
20+
OCP --> Total
21+
deactivate OCP
22+
Total --> Mod
23+
deactivate Total
24+
[<-- Mod
25+
deactivate Mod
26+
27+
[-> Mod: done(deliverable)
28+
activate Mod
29+
Mod -> Com : add(1)
30+
activate Com
31+
Com -> ":OCP" as OCP: update()
32+
activate OCP
33+
OCP --> Com
34+
deactivate OCP
35+
Com --> Mod
36+
deactivate Com
37+
[<-- Mod
38+
deactivate Mod
39+
40+
[-> Mod: delete(deliverable)
41+
activate Mod
42+
43+
opt isCompleted(deliverable)
44+
45+
Mod -> Com : sub(1)
46+
activate Com
47+
Com -> ":OCP" as OCP: update()
48+
activate OCP
49+
OCP --> Com
50+
deactivate OCP
51+
Com --> Mod
52+
deactivate Com
53+
54+
end
55+
56+
Mod -> Total : sub(1)
57+
activate Total
58+
Total -> ":OCP" as OCP: update()
59+
activate OCP
60+
OCP --> Total
61+
deactivate OCP
62+
Total --> Mod
63+
deactivate Total
64+
65+
[<-- Mod
66+
deactivate Mod
67+
@enduml

docs/images/OCPSequenceDiagram.png

50.5 KB
Loading

0 commit comments

Comments
 (0)