From 3b880adef0f8a303ed493299e0a412e220cbffa5 Mon Sep 17 00:00:00 2001 From: ZhangJiayu0303 Date: Tue, 19 Mar 2019 22:32:33 +0800 Subject: [PATCH] Update add command for Developer Guide --- docs/DeveloperGuide.adoc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 8b92d5fb7e62..e9225cbbc3f8 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -340,6 +340,26 @@ We are using `java.util.logging` package for logging. The `LogsCenter` class is Certain properties of the application can be controlled (e.g user prefs file location, logging level) through the configuration file (default: `config.json`). + +=== Three new attributes: Salary, Occupation, Relationship +==== Current Implementation +The add Command is modified in this enhancement. Previously, user can only add a person's name, phone number, address and tags to the address book. +After this enhancement, following attributes are added to the person's information: + +* `SALARY`: salary must be a string with more than one digits +* `OCCUPATION`: occupation can be a string with any characters +* `RELATIONSHIP`: relationship must be a string with one word (no blank allowed) + +===== How to implement the command +Users just input: +add n/NAME p/PHONE e/EMAIL a/ADDRESS s/SALARY o/OCCUPATION r/RELATIONSHIP [t/TAG] +Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 s/100000o/bankerr/singlet/friends t/owesMoney + + +===== Pros and Cons +** Pros: Easy to implement, and the add format just follows the previous version +** Cons: When implementing add Command, Users must add all information except the optional TAG attribute, this makes the command not flexible enough + == Documentation We use asciidoc for writing documentation. @@ -829,7 +849,7 @@ Priorities: High (must have) - `* * \*`, Medium (nice to have) - `* \*`, Low (un |Priority |As a ... |I want to ... |So that I can... |`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App -|`* * *` |user |add a new person | +|`* * *` |user |add a new person | name, phone, address, salary, occupation, relationship, tags (optional) |`* * *` |user |delete a person |remove entries that I no longer need