Skip to content

Commit f394f47

Browse files
authored
Merge pull request #245 from dhafinrazaq/dg
Update add schedule activity diagram
2 parents 4567945 + df1f529 commit f394f47

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

docs/DeveloperGuide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,18 +246,18 @@ In designing this feature, we had to consider several alternative ways in which
246246

247247
### Add Schedule feature
248248

249-
The add schedule feature allows user to create a schedule associated with a client and a session.
250-
In other words, it allows user to schedule a client to a session.
249+
The Add Achedule feature allows user to create a Schedule associated with a Client and a Session.
250+
In other words, it allows user to schedule a Client to a Session.
251251

252252
#### Implementation
253253

254-
The add schedule mechanism is facilitated by `AddScheduleCommand` which extends `Command`. The format of the
254+
The Add Schedule mechanism is facilitated by `AddScheduleCommand` which extends `Command`. The format of the
255255
command is given by:
256256

257257
```schadd c/CLIENT_INDEX s/SESSION_INDEX```
258-
When using this command, the `CLIENT_INDEX` should refer to the index shown in the Client List on the left panel, and is used to specify the client. The `SESSION_INDEX` should refer to the index shown in the Session List on the right panel, and is used to specify the session.
258+
When using this command, the `CLIENT_INDEX` should refer to the index shown in the Client List on the left panel, and is used to specify the Client. The `SESSION_INDEX` should refer to the index shown in the Session List on the right panel, and is used to specify the Session.
259259

260-
The following activity diagram summarizes the decision making process when a user executes a new `AddSchedule` command. Notice how it checks for overlapping schedule first.
260+
The following activity diagram summarizes the decision making process when a user executes a new `AddSchedule` command. Notice how it checks for overlapping Schedule first.
261261

262262
![AddScheduleActivityDiagram](images/AddScheduleActivityDiagram.png)
263263

@@ -267,19 +267,19 @@ Assume the current state of Client, Session, and Schedule is as illustrated on t
267267

268268
![OverlappingScheduleObjectDiagram0](images/OverlappingScheduleObjectDiagram0.png)
269269

270-
Now, consider two cases of add schedule command to be invoked.
270+
Now, consider two cases of Add Schedule command to be invoked.
271271

272272
**Case 1**: `schadd c/2 s/1`
273273

274-
Invoking `schadd c/2 s/1` will add a schedule associated with Andy (the second client in the Client List) and endurance training from 12/12/2020 1400 - 1600 (the first session in the Session List).
274+
Invoking `schadd c/2 s/1` will add a Schedule associated with Andy (the second Client in the Client List) and endurance training from 12/12/2020 1400 - 1600 (the first Session in the Session List).
275275

276-
Thus, the result can be illustrated by the following object diagram, shown by a new created schedule:
276+
Thus, the result can be illustrated by the following object diagram, shown by a new created Schedule:
277277

278278
![OverlappingScheduleObjectDiagram1](images/OverlappingScheduleObjectDiagram1.png)
279279

280280
**Case 2:** `schadd c/1 s/1`
281281

282-
On the other hand, invoking `schadd c/1 s/1` will result in an error shown to the user as there is an overlapping schedule (John is already scheduled to endurance training from 12/12/2020 1400 - 1600).
282+
On the other hand, invoking `schadd c/1 s/1` will result in an error shown to the user as there is an overlapping Schedule (John is already scheduled to endurance training from 12/12/2020 1400 - 1600).
283283

284284
### \[Proposed\] Undo/redo feature
285285

docs/diagrams/AddScheduleActivityDiagram.puml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
@startuml
22
start
3-
:User executes AddScheduleCommand;
3+
:User executes Add Schedule command;
44
:Parse input from user;
5-
:Check for overlapping Schedule;
5+
:Get the specified Client and Session;
6+
:Check if a Schedule associated with the Client and Session already exists;
67

78
' Since the beta syntax does not support placing the condition outside the
89
' diamond we place it as the true branch instead.
910

10-
if () then ([Overlapping Schedule is found])
11+
if () then ([Existing Schedule is found])
1112
:Show error message to user;
1213
stop
1314
else([else])

0 commit comments

Comments
 (0)