diff --git a/README.md b/README.md
index 13f5c77403f..82be72608ef 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,178 @@
-[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions)
-
-![Ui](docs/images/Ui.png)
-
-* This is **a sample project for Software Engineering (SE) students**.
- Example usages:
- * as a starting point of a course project (as opposed to writing everything from scratch)
- * as a case study
-* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details.
- * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big.
- * It comes with a **reasonable level of user and developer documentation**.
-* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...).
-* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**.
-* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info.
+[![codecov](https://codecov.io/gh/AY2122S2-CS2103T-W11-4/tp/branch/master/graph/badge.svg?token=TO5WF437LI)](https://codecov.io/gh/AY2122S2-CS2103T-W11-4/tp)
+
+[![Contributors][contributors-shield]][contributors-url]
+[![Forks][forks-shield]][forks-url]
+[![Issues][issues-shield]][issues-url]
+
+
+
+
+
+
+
+
+
+
+## About The Project
+
+NUSearch is a GUI application that allows students to easily and conveniently find the contacts of faculty members so that
+they may contact members of faculty more easily.
+
+The product is not an official NUS project, although the project was conceived by and worked on by NUS students
+during the CS2103T module.
+
+
+
+### Built With
+
+This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
+
+* [java](https://www.java.com/)
+* [javaFX](https://openjfx.io/)
+
+
+
+
+
+
+
+## Getting Started
+
+Read the getting started segment to understand how to get started on using NUSearch
+
+
+### Installation
+
+Follow these steps closely to get started.
+
+1. Download our latest .jar file here
+2. Locate the .jar file in your downloads folder
+3. Open the .jar file to run the application
+
+
+
+
+## Usage
+
+_For more usage examples, please refer to the [Documentation](https://github.com/AY2122S2-CS2103T-W11-4/tp#readme)_
+
+
+
+
+
+
+## Roadmap
+
+- [ ] Add Changelog
+- [x] Add back to top links
+- [ ] Add Additional Templates w/ Examples
+- [ ] Add "components" document to easily copy & paste sections of the readme
+
+See the [open issues](https://github.com/AY2122S2-CS2103T-W11-4/tp/issues) for a full list of proposed features (and known issues).
+
+
+
+
+
+
+## Contributing
+
+Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
+
+If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
+Don't forget to give the project a star! Thanks again!
+
+1. Fork the Project
+2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
+3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
+4. Push to the Branch (`git push origin feature/AmazingFeature`)
+5. Open a Pull Request
+
+
+
+
+
+
+## Acknowledgments
+
+The team would like to give a big shout out these projects, from which we have used parts of in our project. Special shout out to
+you Prof. Damith <3.
+
+* [AddressBook 3](https://se-education.org)
+* [Img Shields](https://shields.io)
+* [GitHub Pages](https://pages.github.com)
+
+
+
+
+
+
+
+[contributors-shield]: https://img.shields.io/github/contributors/AY2122S2-CS2103T-W11-4/tp.svg
+[contributors-url]: https://github.com/AY2122S2-CS2103T-W11-4/tp/people
+[forks-shield]: https://img.shields.io/github/forks/AY2122S2-CS2103T-W11-4/tp.svg
+[forks-url]: https://github.com/AY2122S2-CS2103T-W11-4/tp/network/members
+[issues-shield]: https://img.shields.io/github/issues/AY2122S2-CS2103T-W11-4/tp.svg
+[issues-url]: https://github.com/AY2122S2-CS2103T-W11-4/tp/issues
+
diff --git a/build.gradle b/build.gradle
index be2d2905dde..35e412a28e2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -66,7 +66,11 @@ dependencies {
}
shadowJar {
- archiveName = 'addressbook.jar'
+ archiveName = 'NUSearch.jar'
+}
+
+run {
+ enableAssertions = true
}
defaultTasks 'clean', 'test'
diff --git a/docs/AboutUs.md b/docs/AboutUs.md
index 1c9514e966a..376d3ee0a48 100644
--- a/docs/AboutUs.md
+++ b/docs/AboutUs.md
@@ -9,51 +9,42 @@ You can reach us at the email `seer[at]comp.nus.edu.sg`
## Project team
-### John Doe
+### Shurvir Arora
-
+
-[[homepage](http://www.comp.nus.edu.sg/~damithch)]
-[[github](https://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+* [[github](http://github.com/shurvirarora)]
+* [[portfolio](team/shurvirarora.md)]
-* Role: Project Advisor
-
-### Jane Doe
-
-
-
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
-
-* Role: Team Lead
-* Responsibilities: UI
+* Role: Developer
+* Responsibilities: `Logic`, `Model` components.
-### Johnny Doe
+### Eugene Chia
-
+
-[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)]
+* [[github](http://github.com/eugenechiaay)]
+* [[portfolio](team/eugenechiaay.md)]
* Role: Developer
-* Responsibilities: Data
+* Responsibilities: `Logic`, `Storage` components.
-### Jean Doe
+### Jia Ming
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+* [[github](http://github.com/simjm)]
+* [[portfolio](team/simjm.md)]
* Role: Developer
-* Responsibilities: Dev Ops + Threading
+* Responsibilities: `Model`, `UI` components.
-### James Doe
+### Wei En
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+* [[github](http://github.com/tanweien)]
+* [[portfolio](team/tanweien.md)]
* Role: Developer
-* Responsibilities: UI
+* Responsibilities: `Logic`, `Testing` components.
diff --git a/docs/DevOps.md b/docs/DevOps.md
index 26354050fa4..44d0b59beda 100644
--- a/docs/DevOps.md
+++ b/docs/DevOps.md
@@ -43,8 +43,7 @@ This project uses GitHub Actions for CI. The project comes with the necessary Gi
As part of CI, this project uses Codecov to generate coverage reports. When CI runs, it will generate code coverage data (based on the tests run by CI) and upload that data to the CodeCov website, which in turn can provide you more info about the coverage of your testes. Here are the steps to set up CodeCov for a fork of this repository.
1. Sign up with Codecov using your GitHub account [here](https://codecov.io/signup).
-1. Once you are inside Codecov web app, add your org (that contains the fork) to CodeCov.
-1. Wait for the next run of CI in your fork (or push a dummy commit to it to trigger CI) to confirm CI is able to upload generated coverage data to CodeCov. If CodeCov is not set up correctly, the CI run will fail with an error message that mentions CodeCov.
+1. Once you are inside Codecov web app, add your fork to CodeCov.
1. Get the Markdown code for the Codecov badge provided in `Settings > Badges` and update the `docs/index.md` of your repo with it so that the badge [![codecov](https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg)](https://codecov.io/gh/se-edu/addressbook-level3) in that page reflects the coverage of your project.
### Repository-wide checks
diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index 46eae8ee565..d9951fe6ffa 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -1,17 +1,68 @@
---
layout: page
-title: Developer Guide
+title: NUSearch Developer Guide
---
-* Table of Contents
-{:toc}
-
--------------------------------------------------------------------------------------------------------------------
+
+
+ Table of Contents
+
+
+
+
+
## **Acknowledgements**
-* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
+* Adapted from [AddressBook3](https://github.com/nus-cs2103-AY2122S2/tp)
---------------------------------------------------------------------------------------------------------------------
+___________________________________________________________________________________________________________________
## **Setting up, getting started**
@@ -19,20 +70,24 @@ Refer to the guide [_Setting up and getting started_](SettingUp.md).
--------------------------------------------------------------------------------------------------------------------
-## **Design**
+## Design
-
+> :bulb: **TIP:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/AY2122S2-CS2103T-W11-4/tp/tree/master/docs/diagrams) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
-:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/se-edu/addressbook-level3/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
-
The ***Architecture Diagram*** given above explains the high-level design of the App.
-Given below is a quick overview of main components and how they interact with each other.
+
+Given below is a quick overview of Main components and how they interact with each other.
**Main components of the architecture**
@@ -42,102 +97,167 @@ Given below is a quick overview of main components and how they interact with ea
[**`Commons`**](#common-classes) represents a collection of classes used by multiple other components.
-The rest of the App consists of four components.
+The rest of the App consists of five components.
* [**`UI`**](#ui-component): The UI of the App.
* [**`Logic`**](#logic-component): The command executor.
* [**`Model`**](#model-component): Holds the data of the App in memory.
* [**`Storage`**](#storage-component): Reads data from, and writes data to, the hard disk.
-
+* [`CommandManager`](#command-manager-component): Receives commands from the logic component and handles its execution/un-execution appropriately.
**How the architecture components interact with each other**
-The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete 1`.
+The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command delete 1.
+
+
+
+Each of the five main components (also shown in the diagram above),
-
+* defines its *API* in an interface with the same name as the Component.
+* implements its functionality using a concrete {Component Name}Manager class (which follows the corresponding API interface mentioned in the previous point.
-Each of the four main components (also shown in the diagram above),
+> :bulb: Eg. The Model component defines its API in the Model.java interface and implements its functionality using the ModelManager.java class which follows the Model interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
-* defines its *API* in an `interface` with the same name as the Component.
-* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding API `interface` mentioned in the previous point.
+The following section gives more details of each component.
-For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
+### Components
-
+
-The sections below give more details of each component.
+#### **The UI Component**
-### UI component
+**API** : [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java)
-The **API** of this component is specified in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java)
+
-![Structure of the UI Component](images/UiClassDiagram.png)
+The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter etc. All these, including the MainWindow, inherit from the abstract UiPart class which captures the commonalities between classes that represent parts of the visible GUI.
-The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.
+The UI component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml files that are in the src/main/resources/view folder. For example, the layout of the [MainWindow](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [MainWindow.fxml](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)
-The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)
+The UI component,
-The `UI` component,
+* executes user commands using the Logic component.
+* listens for changes to Model data so that the UI can be updated with the modified data.
+* keeps a reference to the Logic component, because the UI relies on the Logic to execute commands.
+* depends on some classes in the Model component, as it displays Person object residing in the Model.
-* executes user commands using the `Logic` component.
-* listens for changes to `Model` data so that the UI can be updated with the modified data.
-* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands.
-* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.
+> :memo: **NOTE** The Command Manager component is not reflected in the diagram since there are no direct dependencies with the UI component
-### Logic component
+#### **The Logic Component**
**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
Here's a (partial) class diagram of the `Logic` component:
-
+
How the `Logic` component works:
1. When `Logic` is called upon to execute a command, it uses the `AddressBookParser` class to parse the user command.
1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `AddCommand`) which is executed by the `LogicManager`.
-1. The command can communicate with the `Model` when it is executed (e.g. to add a person).
-1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`.
+1. The command can communicate with the `CommandManager` when it is executed (e.g. to add a person).
+1. The result of the command execution is encapsulated as a `CommandResult` object which is returned from `Logic`.
The Sequence Diagram below illustrates the interactions within the `Logic` component for the `execute("delete 1")` API call.
-![Interactions Inside the Logic Component for the `delete 1` Command](images/DeleteSequenceDiagram.png)
-
-
:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+
+> :memo: **NOTE:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+
Here are the other classes in `Logic` (omitted from the class diagram above) that are used for parsing a user command:
-
+
How the parsing works:
* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.
-### Model component
-**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
+#### **The CommandManageable Component**
+
+**API** : [`CommandManageable.java`](https://github.com/eugenechiaay/tp/blob/master/src/main/java/seedu/address/logic/commands/CommandManageable.java)
+
+
-
+The `CommandManageable` component,
+* receives command objects from the `Logic` component e.g. a `DeleteCommand`.
+* keeps track of commands and states in a stack.
+* any `UndoCommand` or `RedoCommand` it receives will be processed differently from other commands.
+* a component between logic and model, commands are executed and un-execute here.
+
+> :bulb: **COOL:** The Command Manager component was built as a means to support the newly implemented undo and redo functions!
+
+#### **The Model Component**
+
+**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
+
+
The `Model` component,
-* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
+* stores the NUSearch data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)
-
:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.
-
-
+>:memo: **NOTE:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.
+
The `Storage` component,
* can save both address book data and user preference data in json format, and read them back into corresponding objects.
@@ -152,92 +272,178 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa
## **Implementation**
-This section describes some noteworthy details on how certain features are implemented.
+### Add Person feature
-### \[Proposed\] Undo/redo feature
+This section describes how a `Person` object is added to the list of Contacts.
-#### Proposed Implementation
+**Implementation**
-The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations:
+A `Person` object in NUSearch consists of `Name`, `Phone`, `Faculty`, `Email`, `Role`, `Faculty`, `Tag`, `Telegram`. The latter two fields are Optional fields.
+When a `add` command is being input to the command input box, a `Person` will be added to the `UniquePersonsList`.
-* `VersionedAddressBook#commit()` — Saves the current address book state in its history.
-* `VersionedAddressBook#undo()` — Restores the previous address book state from its history.
-* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history.
+Here is how an example of how the `add` command behaves:
-These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively.
+1. The user inputs - `add n/Shurvir Arora p/92212429 e/hello@gmail.com r/Professor f/Science t/Hello tele/@Shuvy123`.
+2. The user's input is received by the `LogicManager` class and passed into the `parseCommand` method of the `AddressBookParser` class.
+3. In the `parseCommand` method, the `add` command format is being matched.
+5. An `AddCommand` object is created using the user's input as arguments.
+6. The `AddCommand` object is then returned to the `LogicManager` class and then passed to the `CommandManager` class.
+7. The `AddCommand` is executed in the `CommandManager` class, whereby a `Person` object with the given fields is constructed and added to the `UniquePersonsList`.
-Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
+**Sequence Diagram**
-Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state.
+The given sequence diagram shows the execution of the feature.
-![UndoRedoState0](images/UndoRedoState0.png)
+
-Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
+**Activity Diagram**
-![UndoRedoState1](images/UndoRedoState1.png)
+
-Step 3. The user executes `add n/David …` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.
+### Favourite/Un-favourite Person Feature
-![UndoRedoState2](images/UndoRedoState2.png)
+This section describes how a `Person` object is "favourited" or "Un-favourited".
-
:information_source: **Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`.
+**Implementation**
-
+Apart from the fields stated above, a `Person` object also has a `Favourite` boolean field to indicate whether a person is a favourite one or not.
-Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.
+Here is how an example of how the `fav` command behaves:
-![UndoRedoState3](images/UndoRedoState3.png)
+1. The user inputs - `fav 1`.
+2. The user's input is received by the `LogicManager` class and passed into the `parseCommand` method of the `AddressBookParser` class.
+3. In the `parseCommand` method, the `fav` command format is being matched.
+4. A `FavouriteCommand` object is created using the user's input as arguments.
+5. The `FavouriteCommand` object is then returned to the `LogicManager` class and then passed to the `CommandManager` class.
+6. The `FavouriteCommand` is executed in the `CommandManager` class, whereby a clone of the target `Person` is created, albeit its `Favourite` field set to true.
-
:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather
-than attempting to perform the undo.
+> The programme behaves in a similar way for "Unfavourite" command.
-
+**Sequence Diagram**
-The following sequence diagram shows how the undo operation works:
+The given sequence diagram shows the execution of the feature.
-![UndoSequenceDiagram](images/UndoSequenceDiagram.png)
+
:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+**Activity Diagram**
+
-The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state.
+### Find Person(s) by Tag Feature
+
+This section describes how the find by `Tag` feature works.
+
+**Implementation**
+
+The find by`Tag` feature operates through the use of the `Predicate` class. Where a `FilteredPersonsList` is updated using a `Predicate` object.
+
+Here is how an example of how the `tag` command behaves:
+
+1. The user inputs - `tag friends`.
+2. The user's input is received by the `LogicManager` class and passed into the `parseCommand` method of the `AddressBookParser` class.
+3. In the `parseCommand` method, the `tag` command format is being matched.
+4. The user's input is used to create a `Predicate` object. With this `Predicate` object, a `TagCommand` is created.
+5. The `TagCommand` object is then returned to the `LogicManager` class and then passed to the `CommandManager` class.
+6. The `TagCommand` is executed in the `CommandManager` class, whereby the `FilteredPersonsList` is update with the `Predicate` object.
-
:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
+**Sequence Diagram**
+The given sequence diagram shows the execution of the feature.
+
+
-Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged.
+### Undo/Redo Command Feature
+
+This section describes how the Undo/Redo feature works.
+
+**Implementation**
+
+Here is how an example of how the `Undo/Redo` command behaves:
+
+Example starting state with 2 states prior:
-![UndoRedoState4](images/UndoRedoState4.png)
+
-Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …` command. This is the behavior that most modern desktop applications follow.
+1. The user inputs - `Undo`.
+2. The user's input is received by the `LogicManager` class and passed into the `parseCommand` method of the `AddressBookParser` class.
+3. In the `parseCommand` method, the `undo` command format is being matched.
+4. An `UndoCommand` is created.
+5. The `UndoCommand` object is then returned to the `LogicManager` class and then passed to the `CommandManager` class.
+6. The `UndoCommand` is executed in the `CommandManager` class, whereby the state of the `Addressbook` is updated to the previous state.
+
+
-![UndoRedoState5](images/UndoRedoState5.png)
+**Sequence Diagram**
-The following activity diagram summarizes what happens when a user executes a new command:
+The given sequence diagram shows the execution of the feature.
-
+
-#### Design considerations:
+### Copy Email/Phone Number Feature
-**Aspect: How undo & redo executes:**
+This section describes how the Copy Email/Phone Number feature works.
-* **Alternative 1 (current choice):** Saves the entire address book.
- * Pros: Easy to implement.
- * Cons: May have performance issues in terms of memory usage.
+**Implementation**
-* **Alternative 2:** Individual command knows how to undo/redo by
- itself.
- * Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
- * Cons: We must ensure that the implementation of each individual command are correct.
+Here is how an example of how the Copy Email/Phone Number command behaves:
-_{more aspects and alternatives to be added}_
+1. The user inputs - `copy-email 2`.
+2. The user's input is received by the `LogicManager` class and passed into the `parseCommand` method of the `AddressBookParser` class.
+3. In the `parseCommand` method, the `copy-email` command format is being matched.
+4. A `CopyEmailCommand` command is created.
+5. The `CopyEmailCommand` object is then returned to the `LogicManager` class and then passed to the `CommandManager` class.
+6. The `CopyEmailCommand` is executed in the `CommandManager` class, whereby the `Email` of a `Person` object at the specified index is copied unto the device's clipboard.
-### \[Proposed\] Data archiving
+**Sequence Diagram**
-_{Explain here how the data archiving feature will be implemented}_
+The given sequence diagram shows the execution of the feature.
+
--------------------------------------------------------------------------------------------------------------------
@@ -251,48 +457,184 @@ _{Explain here how the data archiving feature will be implemented}_
--------------------------------------------------------------------------------------------------------------------
-## **Appendix: Requirements**
+## **Appendix**
+
+**Requirements**
### Product scope
**Target user profile**:
-* has a need to manage a significant number of contacts
-* prefer desktop apps over other types
-* can type fast
-* prefers typing to mouse interactions
-* is reasonably comfortable using CLI apps
+* Has a need to manage a significant number of contacts
+* Prefers desktop apps over other types
+* Can type fast
+* Prefers typing to mouse interactions
+* Is reasonably comfortable using CLI apps
-**Value proposition**: manage contacts faster than a typical mouse/GUI driven app
+**Value proposition**: manage NUS contacts faster than a typical mouse/GUI driven app
### User stories
Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`
-| 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 | delete a person | remove entries that I no longer need |
-| `* * *` | user | find a person by name | locate details of persons without having to go through the entire list |
-| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident |
-| `*` | user with many persons in the address book | sort persons by name | locate a person easily |
+| 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 staff | |
+| `* * *` | user | delete a staff | remove entries that I no longer need |
+| `* * *` | user | find a staff by name | locate details of staff without having to go through the entire list |
+| `* * *` | user | find a staff by tag | locate details of staff associated with the tag without knowing their names |
+| `* * *` | user | list all staff contacts | view all the staff contacts in NUSearch |
+| `* * ` | user | add an existing staff to favourites list | |
+| `* * ` | user | delete an existing staff from favourites list | |
+| `* * ` | user | list all favourite contacts | view all my favourite staff contacts |
+| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident |
+| `*` | user with many persons in the address book | sort persons by name | locate a person easily |
+| `*` | user | click on hyperlinks on a contact | contact staff easily |
*{More to be added}*
### Use cases
-(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)
+(For all use cases below, the **System** is the `NUSearch` and the **Actor** is the `user`, unless specified otherwise)
+
+**Use case 1: Viewing help**
+
+**MSS**
+
+1. User requests to access the help page
+2. NUSearch shows list of commands and syntax on how to use them
+
+ Use case ends.
+
+
+**Use case 2: Adding a contact**
+
+**MSS**
+
+1. User requests to add contact to the list
+2. NUSearch adds the contact in the database.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. The given contact exist in the NUSearch database.
+
+ * 2a1. NUSearch shows an error message.
+
+ Use case resumes at step 2.
-**Use case: Delete a person**
+
+
+**Use case 3: Listing all contacts**
**MSS**
-1. User requests to list persons
-2. AddressBook shows a list of persons
-3. User requests to delete a specific person in the list
-4. AddressBook deletes the person
+1. User requests to list all contacts.
+2. NUSearch shows a list of contacts.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. The list is empty.
+
+ Use case ends.
+
+
+**Use case 4: Locating contacts by name**
+
+**MSS**
+
+1. User requests to find contacts with name.
+2. NUSearch shows a list of contacts with the name.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. The given name does not exist in the NUSearch database.
+
+ * 2a1. NUSearch shows an error message.
+
+ Use case resumes at step 2.
+
+**Use case 5: Locate contact by tag**
+
+**MSS**
+
+1. User requests to list all contacts that contain the specified tag
+2. NUSearch shows a list of contacts
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. The list is empty.
+
+ Use case ends.
+
+
+**Use case 6: Add contacts to favourites list**
+
+**MSS**
+
+1. User requests to add a contact to the favourites list
+2. NUSearch shows an updated list of the user's favourite contacts
+
+ Use case ends.
+
+**Extensions**
+
+* 1a. The contact specified does not exist in the system.
+
+ The system prompts the user to key in another contact to be added
+
+**Use case 7: Remove contacts from favourites list**
+
+**MSS**
+
+1. User requests to remove a contact from the favourites list
+2. NUSearch shows an updated list of the user's favourite contacts
+
+ Use case ends.
+
+**Extensions**
+
+* 1a. The contact specified does not exist in the system.
+
+ The system prompts the user to key in another contact to be added
+
+* 2a. The list is empty.
+
+ Use case ends.
+
+**Use case 8: Listing all favourite contacts**
+
+**MSS**
+
+1. User requests to list all favourite contacts.
+2. NUSearch shows a list of contacts.
+
+ Use case ends.
+
+**Extensions**
+
+* 2a. The list is empty.
+
+ Use case ends.
+
+
+**Use case 9: Delete a contact**
+
+**MSS**
+
+1. User requests to list contacts
+2. NUSearch shows a list of contacts
+3. User requests to delete a specific contact in the list
+4. NUSearch deletes the contact
Use case ends.
@@ -304,17 +646,26 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
* 3a. The given index is invalid.
- * 3a1. AddressBook shows an error message.
+ * 3a1. NUSearch shows an error message.
Use case resumes at step 2.
-*{More to be added}*
+**Use case 10: Exit the program**
+
+**MSS**
+
+1. User requests to exit the program
+2. NUSearch says bye
+
+ Use case ends.
### Non-Functional Requirements
-1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
-2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
-3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
+1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
+2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
+3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
+4. Should be usable by a novice who is unfamiliar with typing commands.
+5. Should quickly display requested information within 2 seconds.
*{More to be added}*
@@ -322,10 +673,13 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
* **Mainstream OS**: Windows, Linux, Unix, OS-X
* **Private contact detail**: A contact detail that is not meant to be shared with others
+* **Command-line interface**: A command-line interface processes commands to a computer program in the form of lines of text
+* **Student**: A student from NUS
+* **Staff**: Staff member of NUS, including teaching assistants and administrative staff
--------------------------------------------------------------------------------------------------------------------
-## **Appendix: Instructions for manual testing**
+## **Instructions for manual testing**
Given below are instructions to test the app manually.
@@ -338,40 +692,43 @@ testers are expected to do more *exploratory* testing.
1. Initial launch
- 1. Download the jar file and copy into an empty folder
+ 1. Download the jar file and copy into an empty folder
- 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
+ 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
1. Saving window preferences
- 1. Resize the window to an optimum size. Move the window to a different location. Close the window.
+ 1. Resize the window to an optimum size. Move the window to a different location. Close the window.
- 1. Re-launch the app by double-clicking the jar file.
+ 1. Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-1. _{ more test cases … }_
### Deleting a person
1. Deleting a person while all persons are being shown
- 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
+ 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
+
+ 1. Test case: `delete 1`
+ Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
+
+ 1. Test case: `delete 0`
+ Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
- 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
+ 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
+ Expected: Similar to previous.
- 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
- 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
- Expected: Similar to previous.
+### Adding a person
-1. _{ more test cases … }_
+1. Adding a person while all persons are being shown
-### Saving data
+ 1. Prerequisites: Person to be added is not a duplicate person.
-1. Dealing with missing/corrupted data files
+ 1. Test case: `add n/Sim sim e/simsim@gmail.com p/92214993 r/TA f/FASS`
+ Expected: Sim Sim is added.
- 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
+ 1. Other incorrect add commands to try: `add`, `add n/nameWithoutEmailOrPhone`, `...`
+ Expected: Error thrown.
-1. _{ more test cases … }_
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index 3716f3ca8a4..1c91dcd4e05 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -1,192 +1,691 @@
---
layout: page
-title: User Guide
+title: NUSearch User Guide
---
-AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps.
-
-* Table of Contents
-{:toc}
+NUSearch is a **desktop app for managing NUS staff contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI).
+If you can type fast, NUSearch can get your contact management tasks done faster than traditional GUI applications.
--------------------------------------------------------------------------------------------------------------------
+## Introduction
-## Quick start
-
-1. Ensure you have Java `11` or above installed in your Computer.
-1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases).
+ NUS students may find it tough to manage university related contacts.
+ Despite platforms such as Luminus that provides students with relevant contact information for modules, there is no dedicated system that is customised to assist students in maintaining their NUS contacts.
-1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
+> Examples of how NUSearch operates as a university specific contact list:
+>1. Faculty and role are mandatory fields to be filled in to make sure that each contact has a given faculty and role.
+>2. As NUS students and staff often use Telegram as a form a communication, there is an optional field to store each contact's telegram username.
+>3. Each user is able to filter out their contacts based on faculty and role.
-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.
- ![Ui](images/Ui.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.
- Some example commands you can try:
+
+
+ Table of Contents
+
+
+
+
+
+## Quick start:
+
+1. Ensure that you have Java `11` or above installed in your Computer.
+
+
+2. Download the latest `NUSearch.jar` from [here](https://github.com/AY2122S2-CS2103T-W11-4/tp/releases).
+
+
+3. Copy the file to the folder you want to use to store NUSearch.
+
+
+4. Double-click the file to start the app. The GUI (aka Screen) similar to the one below should appear in a few seconds.
+
+> :rainbow: **Colour Scheme:** NUSearch's colour scheme is blue and orange to match the university's traditional colours.
+
+
- * **`list`** : Lists all contacts.
- * **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book.
+5. 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.
- * **`delete`**`3` : Deletes the 3rd contact shown in the current list.
- * **`clear`** : Deletes all contacts.
+ > Some example commands you can try:
- * **`exit`** : Exits the app.
+ > * **`list`** : Lists all contacts.
+ > * **`add`**`n/John Doe p/98765432 e/johnd@example.com f/Computing r/Professor` : Adds a contact named `John Doe` to the NUSearch.
+ > * **`delete`**`3` : Deletes the 3rd contact shown in the current list.
+ > * **`clear`** : Deletes all contacts.
+ > * **`exit`** : Exits the app.
-1. Refer to the [Features](#features) below for details of each command.
+_____________________________________________________
---------------------------------------------------------------------------------------------------------------------
-## Features
+## Notes before use:
-**:information_source: Notes about the command format:**
+* Words in `UPPER_CASE` are the information to be supplied by the user.
+ e.g. in `add n/NAME`,
+ > Example: `NAME` is a type of input which can be used as `add n/John Doe`.
-* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
+ e.g `n/NAME [tele/USERNAME]`,
+ > Example: `[tele/TELEGRAM]` is an optional input, hence`n/John Doe tele/@JohnDoe` and `n/John Doe` are both valid commands.
+
+
+* Items with `…` after them can be used multiple times or not at all (i.e zero times).
+ e.g. `[t/TAG]…`,
+ > Example: `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/CS2103T`, `t/CS2103T t/friend` etc.
+
+
+* Data being entered after the command can be in any order.
+ > Example: The command `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE` is the same as `add p/PHONE_NUMBER n/NAME f/FACULTY e/EMAIL r/ROLE`.
+
-* Items with `…` after them can be used multiple times including zero times.
- e.g. `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
+* If the data entered is expected to be keyed in only once in the command, but you specified it multiple times, only the last occurrence of the data will be taken.
+ > Example: The Phone Number field only stores 1 phone number. Hence, if you entered 2 phone numbers `p/12341234 p/56785678`, only the last entry `p/56785678` will be stored.
-* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
-* If a parameter is expected only once in the command but you specified it multiple times, only the last occurrence of the parameter will be taken.
- e.g. if you specify `p/12341234 p/56785678`, only `p/56785678` will be taken.
+* Extraneous input for commands that do not take in additional information (such as `help`, `list`, `exit` and `clear`) will be ignored.
+ > Example: if the command specifies `help 123`, it will be interpreted as `help`.
+
+* Faculty and Role fields can **only** take the following values as input:
+
+| Faculty | Role |
+|:---------:|:----------:|
+| Business | Admin |
+| CDE | Lecturer |
+| CHS | Professor |
+| Computing | Researcher |
+| Dentistry | TA |
+| Law | Tutor |
+| Medicine | Other |
+| Pharmacy |
+| Music |
+| Others |
-* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
- e.g. if the command specifies `help 123`, it will be interpreted as `help`.
-### Viewing help : `help`
+__________________________________________________________________________________________________________________________________
+
+## Commands:
+
+
+ Command List
+
+
+ General Commands
+
+
+
+
+
+
+
+## General Commands
+
+### Exiting the program : `exit`
+
+Exits the program.
+
+Format: `exit`
-Shows a message explaning how to access the help page.
+### View help : `help`
-![help message](images/helpMessage.png)
+Shows a summative list of available commands for you to input.
+
+
Format: `help`
+> :bulb: **TIP:** Click on `Copy URL button to copy the link to our user guide.`
-### Adding a person: `add`
+## Basic Commands
-Adds a person to the address book.
+### Add a contact: `add ...`
-Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
+Adds a contact to the contact list.
-
:bulb: **Tip:**
-A person can have any number of tags (including 0)
+
+Format: `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE [tele/TELEGRAM] [t/TAG]…`
+
+> :spiral_notepad: **NOTE:** When adding faculty and role of a contact, only the following [values](#acceptable-values) are accepted as input.
+>
+> :bulb: **TIP:** A contact can have any number of tags, or none at all.
+
Examples:
-* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
-* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
+* `add n/Shurvir Arora p/98765432 e/shurvir@example.com f/Computing r/Professor`
+* `add n/Betsy Crowe p/98193898 e/betsycrowe@example.com f/Law r/TA tele/@BetsyCrowe t/CS2103T t/Friend`
-### Listing all persons : `list`
+### Clear all contacts : `clear`
-Shows a list of all persons in the address book.
+Clears all contacts from the NUSearch database.
-Format: `list`
+Format: `clear`
+
+> :exclamation: **CAUTION:** This command clears **ALL** contacts in the NUSearch database!
+>
+> :bulb: **TIP:** Accidentally cleared the database? Don't worry, checkout our undo function!
+
+### Delete a contact : `delete ...`
+
+Deletes a contact from the contact list by an index.
+
+
+
+* Deletes the person at the specified `INDEX`.
+* The index refers to the index number shown in the displayed person list.
+* The index **must be a positive integer** 1, 2, 3, …
+
+Format: `delete INDEX`
-### Editing a person : `edit`
+> :bulb: **TIP:** Accidentally deleted the wrong contact? Don't worry, checkout our undo function!
-Edits an existing person in the address book.
+Examples:
+* `delete 2` deletes the 2nd person in the current displayed list.
+* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
+
+### Edit a contact : `edit ...`
-Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…`
+Edits an existing contact in NUSearch database.
+
+
* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …
-* At least one of the optional fields must be provided.
-* Existing values will be updated to the input values.
-* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.
-* You can remove all the person’s tags by typing `t/` without
- specifying any tags after it.
+* Existing values will be updated according to the input values.
+* When editing tags, the existing tags will be removed i.e adding of tags is not cumulative.
+* You can remove all the person’s tags by typing `t/` without specifying any tags after it.
+
+Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [f/FACULTY] [r/ROLE] [tele/TELEGRAM] [t/TAG]…`
+
+> :spiral_notepad: **NOTE:** When editing the faculty and role of a contact, only the following [values](#acceptable-values) are accepted as input.
+>
+> :bulb: **TIP:** The edit command allows you to edit multiple fields of a single contact in one command.
+
+Examples:
+* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st contact in the current displayed list to be `91234567` and `johndoe@example.com` respectively.
+* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd contact in the current displayed list to be `Betsy Crower` and clears all existing tags.
+* `edit 3 f/Computing r/TA` Edits the faculty of the 3rd contact in the current displayed list to be `Computing` and role to be `TA`
+* `edit 1 tele/@hackerway101` Edits the Telegram username of the 1st contact in the current displayed list to `@hackerway101`
+
+### List all contacts : `list`
+
+Displays all contacts in the contact list.
+
+
+
+Format: `list`
+
+> :spiral_notepad: **NOTE:** Contacts listed will be sorted according to the time of addition.
+
+### Undo a command : `undo`
+
+Undo a command that was entered previously.
+
+
+
+Format: `undo`
+
+> :bulb: **TIP:** This function only works if there are commands to undo.
+>
+> :spiral_notepad: **NOTE:** If no command has been previously entered, the undo command will not work.
+> `Undo` does not work on `copy-email` and `copy-phone` commands.
Examples:
-* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.
-* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
+* `If you just added a person named John Doe, you can simply revert that action by keying in "undo".`
+* `If you just deleted a person named Jessica Tan, you can simply revert that action by keying in "undo".`
+
+### Redo a command : `redo`
-### Locating persons by name: `find`
+Redo a command that was previously done.
+
+
-Finds persons whose names contain any of the given keywords.
+Format: `redo`
+
+> :bulb: **TIP:** This function only works if there are commands to redo.
+>
+> :spiral_notepad: **NOTE:** The “redo” command is the inverse of the “undo” command. It redoes an action that was undone.
+> This is valuable if you accidentally execute the "undo" command too many times.
+> `Redo` does not work on `copy-email` and `copy-phone` commands.
+
+Examples:
+* `If you just added a person named John Doe, proceeded to undo that action, and then perform the "redo" command, the person John Doe will still be added as a contact.`
+
+## Find Commands
+
+### Find contacts matching **ALL** keywords : `find ...`
+
+Find contacts that contain **ALL** the given keywords.
+
+
Figure 9. Finding contacts with the keywords Daniel and TA
+
+
+* Keywords can match names, faculty, role e.g. `Computing` will return all contacts with `Computing` in either their name, faculty or role field.
+* The search is case-insensitive. e.g `shur` will match `Shur`
+* The order of the keywords do not matter. e.g. `Wei En` will match `En Wei`
+* Only full words will be matched e.g. `Jiamin` will not match `Jiaming`
+* Only persons matching **ALL** keywords will be returned e.g. `find David Computing` will only return contacts with `David` **AND** `Computing` as part of their keywords.
Format: `find KEYWORD [MORE_KEYWORDS]`
-* The search is case-insensitive. e.g `hans` will match `Hans`
-* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
-* Only the name is searched.
-* Only full words will be matched e.g. `Han` will not match `Hans`
-* Persons matching at least one keyword will be returned (i.e. `OR` search).
- e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`
+> :bulb: **TIP:** Use more keywords if you want to **narrow** your search down to a specific contact.
Examples:
* `find John` returns `john` and `John Doe`
-* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png)
+* `find John Doe` returns `John Doe Lee`, `John Loo Doe` but not `John Moo`
+* `find David Computing` returns `David` from `Computing` but not `David` from `Business`
+* `find David Professor` returns contacts with the name `David` **and** have `Professor` as their role.
-### Deleting a person : `delete`
+### Find contacts matching **ANY** keywords : `find-wide ...`
-Deletes the specified person from the address book.
+Find contacts that contain **ANY** the given keywords.
-Format: `delete INDEX`
+
Figure 10. Finding contacts with the keywords Daniel and TA
+
-* Deletes the person at the specified `INDEX`.
+* Keywords can match names, faculty, role e.g. `Computing` will return all contacts with `Computing` in either their name, faculty or role field.
+* The search is case-insensitive. e.g `shur` will match `Shur`
+* The order of the keywords do not matter. e.g. `Wei En` will match `En Wei`
+* Only full words will be matched e.g. `Jiamin` will not match `Jiaming`
+* Persons matching at least one keyword will be returned e.g. `find-wide Eug ene` will return `Eug in`, `Nal g ene` and `ene eug`
+
+Format: `find-wide KEYWORD [MORE_KEYWORDS]`
+
+> :bulb: **TIP:** Use more keywords if you want to **broaden** your search range.
+
+Examples:
+* `find-wide John` returns `john` and `John Doe`
+* `find-wide John Doe` returns `John Doe Lee`, `John Loo Doe` and `John Moo`
+* `find-wide David Computing` returns **ALL** contacts with the name `David` **or** are from `Computing`
+* `find-wide David Professor` returns **ALL** contacts with the name `David` **or** have `Professor` as their role
+
+### Find contacts by tags: `tag ...`
+
+Find contacts whose attributed tags meet the given keywords.
+
+
+
+* The search is case-insensitive. e.g `colleague` will match `Colleague`
+* Only tags are included in the search, other fields are ignored.
+
+Format: `tag TAG [MORE_TAGS]`
+
+> :bulb: **TIP:** Attaching tags to a contact is a way for you to attach your own meaning to the contact.
+>
+>For example, adding the `CS2103T` tag to your professor's contact to indicate that this professor teaches the `CS2103T` module.
+
+Examples:
+* `tag CS2103T` Lists all contacts in the current displayed list that have the `CS2103T` tag.
+* `tag colleague bestie` Lists all contacts in the current displayed list that have the `colleague` or `bestie` tag.
+
+## Favourite Commands
+
+### Favourite a contact : `fav ...`
+
+Adds a contact to the favorite list.
+
+
+
+Format: `fav INDEX`
+
+> :bulb: **TIP:** Use this function on contacts that you view frequently!
+
+Examples:
+* `fav 1` adds the 1st contact in the current displayed list to the favourites list.
+* `fav 2` adds the 2nd contact in the current displayed list to the favourites list.
+
+### List all favourite contacts : `list-fav`
+
+Displays all favourite contacts in the contact list.
+
+
+
+Format: `unfav INDEX`
+
+Examples:
+* `unfav 1` unfavourites the 1st contact from the current displayed list.
+* `unfav 2` unfavourites the 2nd contact from the current displayed list.
+
+## Copy Commands
+
+### Copy email address : `copy-email ...`
+
+Copies a contact's email address to your clipboard.
+
+
+
+* Copies the email address of the contact at the specified `INDEX`.
* The index refers to the index number shown in the displayed person list.
* The index **must be a positive integer** 1, 2, 3, …
-Examples:
-* `list` followed by `delete 2` deletes the 2nd person in the address book.
-* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
+Format: `copy-email INDEX`
-### Clearing all entries : `clear`
+> :bulb: **TIP:** You can paste the copied email into any text field using the shortcut key combination `Ctrl + V` on a PC or `Command + V` on a Mac.
-Clears all entries from the address book.
+Examples
+* `copy-email 1 will copy the email of the contact at index 1.`
+* `copy-email 4 will copy the email of the contact at index 4.`
-Format: `clear`
+### Copy phone number : `copy-phone ...`
-### Exiting the program : `exit`
+Copies a contact's phone number to your clipboard.
-Exits the program.
+
-Format: `exit`
+* Copies the phone number of the contact at the specified `INDEX`.
+* The index refers to the index number shown in the displayed person list.
+* The index **must be a positive integer** 1, 2, 3, …
+
+Format: `copy-phone INDEX`
+
+> :bulb: **TIP:** You can paste the copied phone number into any text field using the shortcut key combination `Ctrl + V` on a PC or `Command + V` on a Mac.
+
+Examples
+* `copy-phone 1 will copy the phone number of the contact at index 1.`
+* `copy-phone 4 will copy the phone number of the contact at index 4.`
+
+
+______________________________________________________________________
+
+## Data Matters:
### Saving the data
-AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
+NUSearch data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
### Editing the data file
-AddressBook data are saved as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file.
+NUSearch data are saved as a JSON file `[JAR file location]/data/NUSearch.json`. Advanced users are welcome to update data directly by editing that data file.
-
:exclamation: **Caution:**
-If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run.
-
+> :exclamation: **CAUTION:** If your changes to the data file makes its format invalid, NUSearch will discard all data and start with an empty data file at the next run.
+
+______________________________________________________________________________________
-### Archiving data files `[coming in v2.0]`
+## Frequently Asked Questions (FAQ)
+**Q**: Is my data private?
+**A**: Your data is not saved online and is only accessible by you.
-_Details coming soon ..._
+**Q**: How do I transfer my data to another Computer?
+**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous NUSearch home folder.
+
+**Q**: How do I report a bug?
+**A**: You can create an `Issue` on our team's Github page [here](https://github.com/AY2122S2-CS2103T-W11-4/tp/issues).
--------------------------------------------------------------------------------------------------------------------
-## FAQ
+## Command Summary
+
+
+### Category: General Commands
+
+The following commands can be used in any context and are for general purposes.
+
+| Function | Format Of Command |
+|------------------------------|-------------------|
+| **Exit the program** | `exit` |
+| **Display help page pop-up** | `help` |
+
+
+### Category: Basic Commands
+
+The following commands are used in dealing with contacts.
+
+| Function | Format Of Command |
+|-----------------------------------|--------------------------------------------------------------------------------|
+| **Add a new contact** | `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE [tele/TELEGRAM] [t/TAG]…` |
+| **Clear all contacts** | `clear` |
+| **Delete an existing contact** | `delete INDEX` |
+| **Edit an existing contact** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [tele/TELEGRAM] [t/TAG]…` |
+| **List all contacts** | `list` |
+| **Undo previous commands** | `undo` |
+| **Redo commands** | `redo` |
+
+### Category: Find Commands
+
+The following commands are used in dealing with finding contacts.
+
+| Function | Format Of Command |
+|---------------------------------------------|-------------------------------------|
+| **Find contact(s) matching ALL keywords** | `find KEYWORD [MORE_KEYWORDS]` |
+| **Find contact(s) matching ANY keywords** | `find-wide KEYWORD [MORE_KEYWORDS]` |
+| **Find contact(s) by tags** | `tag TAG` |
+
+> :spiral_notepad: **NOTE:** KEYWORD refers to either NAME, ROLE or FACULTY
+
+### Category: Favourite Commands
+
+The following commands are used in dealing with favourite contacts.
+
+| Function | Format Of Command |
+|-----------------------------|-------------------|
+| **Favourite a contact** | `fav INDEX` |
+| **List favourite contacts** | `list-fav` |
+| **Unfavourite a contact** | `unfav INDEX` |
+
+### Category: Copy Commands
+
+The following commands are used in dealing with copying information of contacts.
+
+| Function | Format Of Command |
+|-------------------|-----------------------------|
+| **Copy Email** | `copy-email INDEX` |
+| **Copy Phone** | `copy-phone INDEX` |
+
+
+
+