Skip to content

Commit

Permalink
Merge from justintzuriel - Edit messages and update UG
Browse files Browse the repository at this point in the history
  • Loading branch information
justintzuriel authored Oct 29, 2020
2 parents 5ae9031 + d98a2b9 commit a7ec8d6
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 56 deletions.
26 changes: 13 additions & 13 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ FaculType is a **desktop app** for managing **faculty members and their modules*

1. Copy the file to the folder you want to use as the _home folder_ for FaculType.

1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data (might be different from below).<br>
![Ui](images/Ui.png)
1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.<br>
![Ui](images/UiInit.png)

1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.<br>

Expand Down Expand Up @@ -56,8 +56,8 @@ A contact can have any number of tags (including 0)
</div>

Examples:
* `add n/John Doe p/98765432 e/johnd@example.com d/Computer Science o/B01-A3`
* `add n/Betsy Crowe p/98765431 e/betsycrowe@example.com d/Data Science o/COM1-02-03 t/lecturer t/friend`
* `add n/Janson Garrick p/98765432 e/jansongarrick@example.com d/Computer Science o/B01-A3`
* `add n/Amanda Holt p/98765431 e/amanda123@example.com d/Data Science o/COM1-02-03 t/lecturer t/friend`

### Deleting a contact : `delete`

Expand All @@ -70,8 +70,8 @@ Format: `delete INDEX`
* The index **must be a positive integer** 1, 2, 3, …​

Examples:
* `list` followed by `delete 2` deletes the 2nd contact in FaculType.
* `find Betsy` followed by `delete 1` deletes the 1st contact in the results of the `find` command.
* `clist` followed by `delete 2` deletes the 2nd contact in FaculType.
* `find n/Betsy` followed by `delete 1` deletes the 1st contact in the results of the `find` command.

### Editing a contact : `edit`

Expand All @@ -88,7 +88,7 @@ Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [d/DEPARTMENT] [o/OFFICE] [t/TA

Examples:
* `edit 1 d/Computing o/COM2-01-02` edits the department and office of the 1st contact to be `Computing` and `COM2-01-02` respectively.
* `edit 2 n/Betsy Crowe t/` edits the name of the 2nd contact to be `Betsy Crowe` and clears all existing tags.
* `edit 2 n/Brenda Chan t/` edits the name of the 2nd contact to be `Brenda Chan` and clears all existing tags.

### Adding or updating a remark : `remark`

Expand Down Expand Up @@ -130,7 +130,7 @@ Format : `addmod m/MODULE_CODE n/MODULE_NAME`
* Adds the `MODULE_CODE` specified to the active semester. The `MODULE_CODE` must not exist in the active semester in the first place.

Examples:
* `addmod m/CS2103 n/Software Engineering` adds a module named `Software Engineering` with code `CS2103` to the active semester.
* `addmod m/CS2040S n/Data Structures and Algorithms` adds a module named `Data Structures and Algorithms` with code `CS2040S` to the active semester.
* `addmod m/CS2102 n/Database Systems` adds a module named `Database Systems` with code `CS2102` to the active semester.

### Deleting a module: `delmod`
Expand All @@ -142,14 +142,14 @@ Format: `delmod m/MODULE_CODE`
* Deletes the `MODULE_CODE` specified from the active semester. The `MODULE_CODE` **must exist** in the active semester in the first place.

Examples:
* `delmod m/CS2103` deletes the existing module with code `CS2103` from the active semester.
* `delmod m/CS2040S` deletes the existing module with code `CS2040S` from the active semester.
* `delmod m/CS2102` deletes the existing module with code `CS2102` from the active semester.

### Finding modules : `findmod`

Finds all modules in the active semester that match the given fields.

Format : `findmod [m/MODULE_CODE] [n/MODULE_NAME] [i/INSTRUCTOR]`
Format : `findmod [m/MODULE_CODE] [n/MODULE_NAME] [i/INSTRUCTOR_NAME]`

* The search is insensitive. e.g. `cs2103` will match `CS2103`.
* Partial words will be matched. e.g. `database` will match `Database Systems`.
Expand All @@ -160,8 +160,8 @@ Examples :

* `findmod m/cs210` returns all modules with codes containing `cs210`.
* `findmod n/programming` returns all modules with names containing `programming`.
* `findmod m/CS2 n/security i/Bob` returns all modules with codes containing `CS2`, names containing `programming`,
and instructors with names containing `Bob`.
* `findmod m/CS2 n/security i/Alex` returns all modules with codes containing `CS2`, names containing `programming`,
and instructors with names containing `Alex`.

### Listing all contacts and modules: `list`

Expand Down Expand Up @@ -275,7 +275,7 @@ Action | Format, Examples
**Find** | `find [n/NAME] [p/PHONE] [e/EMAIL] [d/DEPARTMENT] [o/OFFICE] [r/REMARK] [t/TAG]` <br> e.g. `find n/Victor Tan d/Math`
**Add modules** | `addmod m/MODULE_CODE n/MODULE_NAME`<br> e.g. `addmod m/CS2103 n/Software Engineering`
**Delete modules** | `delmod m/MODULE_CODE`<br> e.g. `delmod m/CS2103`
**Find modules** | `findmod [m/MODULE_CODE] [n/MODULE_NAME] [i/INSTRUCTOR]` <br> e.g. `findmod m/CS2`
**Find modules** | `findmod [m/MODULE_CODE] [n/MODULE_NAME] [i/INSTRUCTOR_NAME]` <br> e.g. `findmod m/CS2`
**List all contacts and modules** | `list`
**List all contacts** | `clist`
**List all modules** | `mlist`
Expand Down
Binary file modified docs/images/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/UiInit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/java/seedu/address/logic/commands/AddModCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public class AddModCommand extends Command {

public static final String COMMAND_WORD = "addmod";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a module to FaculType. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a module to FaculType.\n"
+ "Parameters: "
+ PREFIX_MODULE_CODE + "MODULE CODE "
+ PREFIX_MODULE_NAME + "MODULE NAME\n"
+ PREFIX_MODULE_CODE + "MODULE_CODE "
+ PREFIX_MODULE_NAME + "MODULE_NAME\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_MODULE_CODE + "CS2103 "
+ PREFIX_MODULE_NAME + "Software Engineering ";
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/address/logic/commands/AssignCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public class AssignCommand extends Command {
public static final String COMMAND_WORD = "assign";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Assigns an instructor to one or more modules. "
+ ": Assigns an instructor to one or more modules.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ PREFIX_MODULE_CODE + "MODULE CODE "
+ "[" + PREFIX_MODULE_CODE + "MODULE CODE]...\n"
+ PREFIX_MODULE_CODE + "MODULE_CODE "
+ "[" + PREFIX_MODULE_CODE + "MODULE_CODE]...\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ PREFIX_MODULE_CODE + "CS2103";

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/ClistCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class ClistCommand extends Command {

public static final String COMMAND_WORD = "clist";
public static final String MESSAGE_SUCCESS = "Listed all persons";
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Lists all contacts"
+ "\nExample: " + COMMAND_WORD;
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Lists all contacts\n"
+ "Example: " + COMMAND_WORD;

@Override
public CommandResult execute(Model model) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/DelModCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class DelModCommand extends Command {

public static final String COMMAND_WORD = "delmod";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Deletes a module from FaculType. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Deletes a module from FaculType.\n"
+ "Parameters: "
+ PREFIX_MODULE_CODE + "MODULE CODE\n"
+ PREFIX_MODULE_CODE + "MODULE_CODE\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_MODULE_CODE + "CS2103 ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class EditCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the person identified "
+ "by the index number used in the displayed person list. "
+ "Existing values will be overwritten by the input values.\n"
+ "At least one of the fields must be provided.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_PHONE + "PHONE] "
Expand Down
28 changes: 16 additions & 12 deletions src/main/java/seedu/address/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_OFFICE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -25,18 +27,20 @@ public class FindCommand extends Command {
public static final String COMMAND_WORD = "find";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose attributes contain all of "
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "At least one of the specified parameters should be present.\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_DEPARTMENT + "DEPARTMENT "
+ PREFIX_OFFICE + "OFFICE "
+ "Example: "
+ COMMAND_WORD + " "
+ PREFIX_NAME + "alice liddel "
+ PREFIX_DEPARTMENT + "computing";
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "At least one of the fields must be provided.\n"
+ "Parameters: "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_DEPARTMENT + "DEPARTMENT] "
+ "[" + PREFIX_OFFICE + "OFFICE] "
+ "[" + PREFIX_REMARK + "REMARK] "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "Example: "
+ COMMAND_WORD + " "
+ PREFIX_NAME + "Alex Yeoh "
+ PREFIX_DEPARTMENT + "computing";

private final List<Predicate<Person>> predicates;

Expand Down
18 changes: 8 additions & 10 deletions src/main/java/seedu/address/logic/commands/FindModCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ public class FindModCommand extends Command {
public static final String COMMAND_WORD = "findmod";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds the module whose code, name and instructors' "
+ "names contain the specified keywords (case-insensitive) and displays them as a list. "
+ "Command must contain at least one parameter and each parameter can have multiple keywords, "
+ "except for module code. "
+ "names contain the specified keywords (case-insensitive) and displays them as a list.\n"
+ "At least one of the fields must be provided and each field can have multiple keywords, "
+ "except for module code.\n"
+ "Parameters: "
+ PREFIX_MODULE_CODE + "MODULE CODE "
+ PREFIX_MODULE_NAME + "MODULE NAME ... "
+ PREFIX_MODULE_INSTRUCTOR + "INSTRUCTOR's NAME ... \n"
+ "Examples: "
+ COMMAND_WORD + " " + PREFIX_MODULE_CODE + "CS2103 "
+ COMMAND_WORD + " " + PREFIX_MODULE_CODE + "CS2 " + PREFIX_MODULE_INSTRUCTOR + "John, "
+ "[" + PREFIX_MODULE_CODE + "MODULE_CODE] "
+ "[" + PREFIX_MODULE_NAME + "MODULE_NAME] "
+ "[" + PREFIX_MODULE_INSTRUCTOR + "INSTRUCTOR_NAME]\n"
+ "Example: "
+ COMMAND_WORD + " " + PREFIX_MODULE_CODE + "CS1 "
+ PREFIX_MODULE_NAME + "programming methodology" + PREFIX_MODULE_INSTRUCTOR + "Martin";
+ PREFIX_MODULE_NAME + "programming methodology " + PREFIX_MODULE_INSTRUCTOR + "Martin";

private final List<Predicate<Module>> predicates;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/ListCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class ListCommand extends Command {

public static final String COMMAND_WORD = "list";

public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Lists all persons and modules"
+ "\nExample: " + COMMAND_WORD;
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Lists all persons and modules\n"
+ "Example: " + COMMAND_WORD;

public static final String MESSAGE_SUCCESS = "Listed all persons and modules";

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/MlistCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class MlistCommand extends Command {

public static final String COMMAND_WORD = "mlist";
public static final String MESSAGE_SUCCESS = "Listed all modules";
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Lists all modules"
+ "\nExample: " + COMMAND_WORD;
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Lists all modules\n"
+ "Example: " + COMMAND_WORD;


@Override
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/RemarkCommand.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package seedu.address.logic.commands;

import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;

import java.util.List;
Expand All @@ -23,9 +24,9 @@ public class RemarkCommand extends Command {
+ "by the index number used in the last person listing. "
+ "Existing remark will be overwritten by the input.\n"
+ "Parameters: INDEX (must be a positive integer) "
+ "r/ [REMARK]\n"
+ PREFIX_REMARK + "[REMARK]\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ "r/ Likes to swim.";
+ PREFIX_REMARK + "Likes to swim.";

public static final String MESSAGE_ADD_REMARK_SUCCESS = "Added remark to Person: %1$s";
public static final String MESSAGE_DELETE_REMARK_SUCCESS = "Removed remark from Person: %1$s";
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/ResetCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class ResetCommand extends Command {

public static final String COMMAND_WORD = "reset";
public static final String MESSAGE_SUCCESS = "FaculType has been reset!";
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Resets FaculType"
+ "\nExample: " + COMMAND_WORD;
public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD + " : Resets FaculType\n"
+ "Example: " + COMMAND_WORD;


@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class SwitchCommand extends Command {

public static final String COMMAND_WORD = "switch";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Switches the active module list in FaculType."
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Switches the active module list in FaculType.\n"
+ "Example: " + COMMAND_WORD;

public static final String MESSAGE_SWITCH_SUCCESS = "Switched active module list to Semester %s";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class UnassignallCommand extends Command {
public static final String COMMAND_WORD = "unassignall";

public static final String MESSAGE_USAGE = "\n" + COMMAND_WORD
+ ": Unassigns all instructors from all modules. "
+ "\nExample: " + COMMAND_WORD;
+ ": Unassigns all instructors from all modules.\n"
+ "Example: " + COMMAND_WORD;

public static final String MESSAGE_SUCCESS = "Unassigned all instructors from all modules "
+ "in the active semester";
Expand Down

0 comments on commit a7ec8d6

Please sign in to comment.