Skip to content

Commit ee6f67d

Browse files
authored
Merge pull request #215 from totoyoyo/dg-more-usecases
Dg more usecases
2 parents 2695757 + cd61bb4 commit ee6f67d

4 files changed

Lines changed: 121 additions & 40 deletions

File tree

docs/DeveloperGuide.md

Lines changed: 94 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ targeted towards users with a daily 7am - 4pm schedule, have frequent meetings d
2020

2121
--------------------------------------------------------------------------------------------------------------------
2222

23-
## **Setting up, getting started**
23+
## Setting up, getting started
2424

2525
Refer to the guide [_Setting up and getting started_](SettingUp.md).
2626

2727
--------------------------------------------------------------------------------------------------------------------
2828

29-
## **Design**
29+
## Design
3030

3131
### Architecture
3232

@@ -159,7 +159,7 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa
159159

160160
--------------------------------------------------------------------------------------------------------------------
161161

162-
## **Implementation**
162+
## Implementation
163163

164164
This section describes some noteworthy details on how certain features are implemented.
165165

@@ -394,7 +394,7 @@ Reason for choosing Alternative 1: Due to the time constraint of this project, o
394394

395395
--------------------------------------------------------------------------------------------------------------------
396396

397-
## **Documentation, logging, testing, configuration, dev-ops**
397+
## Documentation, logging, testing, configuration, dev-ops
398398

399399
* [Documentation guide](Documentation.md)
400400
* [Testing guide](Testing.md)
@@ -404,15 +404,15 @@ Reason for choosing Alternative 1: Due to the time constraint of this project, o
404404

405405
--------------------------------------------------------------------------------------------------------------------
406406

407-
## **Appendix: Requirements**
407+
## Appendix: Requirements
408408

409409
### Product scope
410410

411411
**Target user profile**:
412412

413413
* Any user who like typing, and is most of the week spent moving about meeting people for his internship, lectures, or social life, have busy schedules
414414
from 7 am - 4pm.
415-
* Has a lot of contacts and meeting alot of people out for events.
415+
* Has a lot of contacts and meeting many people out for events.
416416
* Is more visual and would like to see the meetings on a timetable, and see when he is free.
417417
Is probably relatively young, and has friends with online gravatar profiles.
418418
* Would like to keep track of contacts and organise them as well for
@@ -441,14 +441,14 @@ Users would be better able to manage their social and academic commitments by to
441441
| medium | person trying to back up data | store information in a file | I can clear and move my data to a different machine |
442442
| medium | student with a lot of groups | assign contacts to groups | I can organise my contacts into the groups |
443443
| high | user | close the app | I can clear up my memory and store the data into text files |
444-
| high | student | add meetings | I can keep track of my meetings |
445-
| medium | student | look up meeting by time | I can tell if I'm busy during a time |
446-
| medium | student | sort contacts | I can organize the contact list in a convenient way |
447-
| medium | student | sort meetings | I can organize the meeting list in a convenient way |
448-
| high | student | view all contacts | I can see all the contacts I added |
449-
| high | student | view all meetings | I can see all the meetings I added |
450-
| high | student | delete meetings | I can remove the meetings that already happened |
451-
| high | student | delete contacts | I can remove the unimportant contacts |
444+
| high | user | add meetings | I can keep track of my meetings |
445+
| medium | user | look up meeting by time | I can tell if I'm busy during a time |
446+
| medium | user | sort contacts | I can organize the contact list in a convenient way |
447+
| medium | user | sort meetings | I can organize the meeting list in a convenient way |
448+
| high | user | view all contacts | I can see all the contacts I added |
449+
| high | user | view all meetings | I can see all the meetings I added |
450+
| high | user | delete meetings | I can remove the meetings that already happened |
451+
| high | user | delete contacts | I can remove the unimportant contacts |
452452

453453
## Appendix: Use cases
454454

@@ -462,9 +462,7 @@ Users would be better able to manage their social and academic commitments by to
462462
2. MeetBuddy shows a list of persons
463463
3. User requests to delete a specific person in the list
464464
4. MeetBuddy deletes the person
465-
466-
467-
Use case ends.
465+
Use case ends
468466

469467
**Extensions**
470468

@@ -486,8 +484,7 @@ Users would be better able to manage their social and academic commitments by to
486484
1. User requests to add a meeting with priority
487485
2. MeetBuddy shows the list of meetings after adding.
488486

489-
490-
Use case ends.
487+
Use case ends
491488

492489
**Extensions**
493490

@@ -509,6 +506,83 @@ New features on V1.2
509506
7. Sort contacts by (priorities/personName/groups)
510507
8. Last meetup date for each contact
511508

509+
**Use case: Sort contact list**
510+
511+
**MSS**
512+
513+
1. User requests to sort the contact list
514+
2. MeetBuddy updates the contact list following the sorting criterion.
515+
516+
Use case ends.
517+
518+
**Extensions**
519+
520+
* 1a. The sort parameters are invalid
521+
522+
* 1a1. MeetBuddy shows an error message.
523+
524+
Use case ends.
525+
526+
**Use case: Unsort contact list**
527+
528+
**MSS**
529+
530+
1. User requests to unsort the contact list
531+
2. MeetBuddy updates the contact list to the original state without sorting.
532+
533+
Use case ends.
534+
535+
536+
537+
**Use case: Sort meeting list**
538+
539+
**MSS**
540+
541+
1. User requests to sort the meeting list
542+
2. MeetBuddy updates the meeting list following the sorting criterion.
543+
544+
Use case ends.
545+
546+
**Extensions**
547+
548+
* 1a. The sort parameters are invalid
549+
550+
* 1a1. MeetBuddy shows an error message.
551+
552+
Use case ends.
553+
554+
**Use case: Unsort contact list**
555+
556+
**MSS**
557+
558+
1. User requests to unsort the meeting list
559+
2. MeetBuddy updates the meeting list to the original state without sorting.
560+
561+
Use case ends.
562+
563+
**Use case: Find meeting**
564+
565+
**MSS**
566+
567+
1. User searches for a meeting with some criteria.
568+
2. MeetBuddy updates the meeting list following the criteria.
569+
570+
Use case ends.
571+
572+
**Extensions**
573+
574+
* 1a. The search parameters are invalid
575+
576+
* 1a1. MeetBuddy shows an error message.
577+
578+
Use case ends.
579+
580+
* 2a. No meeting is found.
581+
* 2a1. MeetBuddy shows an empty meeting list.
582+
583+
Use case ends.
584+
585+
512586
## Appendix: Non-Functional Requirements
513587

514588
1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
@@ -533,7 +607,7 @@ especially by adding the event into the app.
533607
--------------------------------------------------------------------------------------------------------------------
534608

535609

536-
## **Appendix: Instructions for manual testing**
610+
## Appendix: Instructions for manual testing
537611

538612
Given below are instructions to test the app manually.
539613

docs/UserGuide.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ their profile pictures.
3030

3131
* **`listp`** : Lists all contacts.
3232

33-
* **`add`**`n/John Doe ph/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to MeetBuddy.
33+
* **`addp`**`n/John Doe ph/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to MeetBuddy.
3434

35-
* **`delete`**`3` : Deletes the 3rd contact shown in the current list.
35+
* **`deletep`**`3` : Deletes the 3rd contact shown in the current list.
3636

3737
* **`exit`** : Exits the app.
3838

@@ -122,7 +122,7 @@ If your changes to the data file makes its format invalid, MeetBuddy will discar
122122

123123
Adds a person to MeetBuddy.
124124

125-
Format: `add n/NAME ph/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GROUP]`
125+
Format: `addp n/NAME [ph/PHONE] [e/EMAIL] [a/ADDRESS] [g/GROUP]...`
126126

127127
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
128128
A person can have any number of groups (including 0)
@@ -132,8 +132,8 @@ In MeetBuddy we assume that all the persons in the contact list have different n
132132
</div>
133133

134134
Examples:
135-
* `add n/John Doe ph/98765432 e/johnd@example.com a/John street, block 123, #01-01`
136-
* `add n/Betsy Crowe g/CS2103 e/betsycrowe@example.com a/Newgate Prison ph/1234567 g/badminton`
135+
* `addp n/John Doe ph/98765432 e/johnd@example.com a/John street, block 123, #01-01`
136+
* `addp n/Betsy Crowe g/CS2103 e/betsycrowe@example.com a/Newgate Prison ph/1234567 g/badminton`
137137

138138
### Listing all persons : `listp`
139139

@@ -215,9 +215,11 @@ Format: `sortp by/FIELD d/DIRECTION`
215215
* Sort by email : `EMAIL`
216216
* Sort by phone number : `PHONE`
217217
* Sort by address : `ADDRESS`
218+
* These are all case-insensitive
218219
* `DIRECTION` is only restricted to the following cases:
219220
* Sort by ascending alphabetical order : `ASC`
220221
* Sort by descending alphabetical order : `DESC`
222+
* These are all case-insensitive
221223

222224
Examples:
223225
* `sortp by/NAME d/ASC` sorts the persons by name and present the result in ascending alphabetical order.
@@ -282,13 +284,17 @@ Examples:
282284

283285
### Locating meetings: `findm`
284286

285-
Finds meetings whose information contain any of the given keywords.
287+
Finds meetings that satisfy all the given criteria.
286288

287-
Format: `findm [n/NAME] [time/TIME] [desc/DESCRIPTION] [pr/PRIORITY] [g/GROUP]...[p/INDEX OF PERSON RELATED]...`
289+
Format: `findm [n/NAME] [time/TIME]... [desc/DESCRIPTION] [pr/PRIORITY] [g/GROUP]... [p/INDEX OF PERSON RELATED]...`
288290

291+
* Though all fields are optional, we require the user to enter at least one.
289292
* The search is case-sensitive in name searching. e.g `CS2103` will not match `cs2103`
290293
* The order of the searching filed does not matter. e.g. `findm n/CS pr/3` will be the same as `findm pr/3 n/CS`.
291-
* Time field refers to a point of time, as long as this point of time is in between of a meeting's start time and ending time, the search will return this specific meeting.
294+
* Time field refers to a point of time, as long as this point of time is
295+
in between of a meeting's start time and ending time (inclusive),
296+
the search will return this specific meeting.
297+
* The user can enter many times. The meetings will have to satisfy all of them.
292298
* Time field must follow YYYY-MM-DD HH:MM format.
293299
* For other fields, the requirement is the same as addm (Adding a meeting). You can refer to the previous UG instruction.
294300

@@ -309,7 +315,6 @@ Format: `showm INDEX`
309315

310316
### Sorting of meetings : `sortm`
311317

312-
313318
Sorts the meetings displayed according to a specified field.
314319

315320
Format: `sortm by/FIELD d/DIRECTION`
@@ -321,9 +326,11 @@ Format: `sortm by/FIELD d/DIRECTION`
321326
* Sort by end time : `END`
322327
* Sort by priority : `PRIORITY`
323328
* Sort by description : `DESCRIPTION`
329+
* These are all case-insensitive
324330
* `DIRECTION` is only restricted to the following cases:
325331
* Sort by ascending order : `ASC`
326332
* Sort by descending order : `DESC`
333+
* These are all case-insensitive
327334
Examples:
328335
* `sortm by/PRIORITY d/ASC` sorts the meetings by priority and present the result in ascending order.
329336

@@ -423,13 +430,13 @@ Examples:
423430

424431
Action | Format, Examples
425432
--------|------------------
426-
**Add** | `addp n/NAME ph/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GROUP]…​` <br> e.g., `addp n/James Ho ph/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 g/CS2106 g/badminton` <br> <br> `addm n/NAME st/START TIME ed/END TIME desc/DESCRIPTION pr/PRIORITY [g/GROUP]...[p/INDEX OF PERSON RELATED]...` <br> e.g., `addm n/CS2103 Lecture st/2021-03-12 14:00 ed/2021-03-12 16:00 desc/Week 7 pr/3 g/lectures g/SoC p/1 p/2`
433+
**Add** | `addp n/NAME [ph/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GROUP]…​` <br> e.g., `addp n/James Ho ph/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 g/CS2106 g/badminton` <br> <br> `addm n/NAME st/TIME ed/TIME [desc/DESCRIPTIONS] [pr/PRIORITY] [p/PERSON RELATED INDEX]… [g/GROUP]…` <br> e.g., `addm n/CS2103 Lecture st/2021-03-12 14:00 ed/2021-03-12 16:00 desc/Week 7 pr/3 g/lectures g/SoC p/1 p/2`
427434
**Delete** | `deletep INDEX`<br> e.g., `deletep 3` <br> <br> `deletem INDEX`<br> e.g., `deletem 3`
428435
**Edit** | `editp INDEX [n/NAME] [ph/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GROUP]…​`<br> e.g.,`editp 2 n/James Lee e/jameslee@example.com` <br> <br> `editm INDEX [n/NAME] [st/START TIME] [ed/END TIME] [desc/DESCRIPTION] [pr/PRIORITY] [p/PERSON RELATED INDEX] [g/GROUP]...​`<br> e.g.,`editm 2 n/CS2103 Lecture`
429-
**Find** | `findp KEYWORD [MORE_KEYWORDS]`<br> e.g., `findp James Jake` <br> <br> `findpg KEYWORD [MORE_KEYWORDS]`<br> e.g., `findpg badminton` <br> <br> `findm [n/NAME] [time/TIME] [desc/DESCRIPTION] [pr/PRIORITY] [g/GROUP]...[p/INDEX OF PERSON RELATED]...`<br> e.g., `findm n/CS pr/3` <br>
436+
**Find** | `findp KEYWORD [MORE_KEYWORDS]`<br> e.g., `findp James Jake` <br> <br> `findpg KEYWORD [MORE_KEYWORDS]`<br> e.g., `findpg badminton` <br> <br> `findm [n/NAME] [time/TIME]... [desc/DESCRIPTION] [pr/PRIORITY] [g/GROUP]... [p/INDEX OF PERSON RELATED]...`<br> e.g., `findm n/CS pr/3` <br>
430437
**List** | `list`, `listm`, `listp`
431438
**Sort** | `sortp by/FIELD d/DIRECTION` <br> `sortm by/FIELD d/DIRECTION`
432439
**Help** | `help`
433440
**SetTimetable**| `setTimetable DATE`
434-
**AddPersonRelatedToAMeeting**|`addptm INDEX p/PERSON RELATED INDEX1 p/PERSON RELATED INDEX2… ​`
435-
**DeletePersonRelatedFromAMeeting**|`deletepfm INDEX p/PERSON RELATED INDEX1 p/PERSON RELATED INDEX2… ​`
441+
**AddPersonRelatedToAMeeting**|`addptm INDEX p/PERSON RELATED INDEX1 [p/PERSON RELATED INDEX2]… ​`
442+
**DeletePersonRelatedFromAMeeting**|`deletepfm INDEX p/PERSON RELATED INDEX1 [p/PERSON RELATED INDEX2]… ​`

src/main/java/seedu/address/logic/commands/meetings/FindMeetingCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ public class FindMeetingCommand extends Command {
2828

2929
public static final String COMMAND_WORD = "findm";
3030

31-
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds meetings with that has all the "
32-
+ "specified values.\n"
31+
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds meetings that meet all the "
32+
+ "specified criteria.\n"
3333
+ "Parameters: "
3434
+ "[" + PREFIX_NAME + "NAME] "
35-
+ "[" + PREFIX_TIME + "TIME] "
35+
+ "[" + PREFIX_TIME + "TIME]... "
3636
+ "[" + PREFIX_DESCRIPTION + "DESCRIPTION] "
3737
+ "[" + PREFIX_PRIORITY + "PRIORITY] "
38-
+ "[" + PREFIX_GROUP + "GROUP]..."
38+
+ "[" + PREFIX_GROUP + "GROUP]... "
3939
+ "[" + PREFIX_PERSON_CONNECTION + "INDEX OF PERSON RELATED]...\n"
4040
+ "Example: " + COMMAND_WORD + " "
4141
+ PREFIX_NAME + "CS2103 Lecture "

src/main/java/seedu/address/logic/commands/persons/AddPersonCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public class AddPersonCommand extends Command {
2323
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
2424
+ "Parameters: "
2525
+ PREFIX_NAME + "NAME "
26-
+ PREFIX_PHONE + "PHONE "
27-
+ PREFIX_EMAIL + "EMAIL "
28-
+ PREFIX_ADDRESS + "ADDRESS "
26+
+ "[" +PREFIX_PHONE + "PHONE] "
27+
+ "[" +PREFIX_EMAIL + "EMAIL] "
28+
+ "[" +PREFIX_ADDRESS + "ADDRESS] "
2929
+ "[" + PREFIX_GROUP + "GROUP]...\n"
3030
+ "Example: " + COMMAND_WORD + " "
3131
+ PREFIX_NAME + "John Doe "

0 commit comments

Comments
 (0)