Skip to content

Commit

Permalink
Merge pull request #260
Browse files Browse the repository at this point in the history
Remove traces of address book
  • Loading branch information
CYX22222003 authored Nov 7, 2024
2 parents cbb3ec3 + 400c4ca commit 255fab1
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 15 deletions.
8 changes: 7 additions & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Format: `add n/NAME p/PHONE_NUMBER e/EMAIL [t/TAG]…​`
</box>

* The phone number must follow the Singaporean convention: have 8 digits, start with 6, 8, or 9, and consist only of numbers.
* Do not add duplicate contacts to the list.
* Two contacts are considered duplicates if they share the same name, email, or phone number.

Examples:
* `add n/John Doe p/98765432 e/[email protected]`
Expand All @@ -141,6 +143,8 @@ Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [t/TAG]…​`
* 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.
* After editing the person, there should be no duplicate contact in the campus connect.
* Two contacts are considered duplicates if they share the same name, email, or phone number.

Examples:
* `edit 1 p/91234567 e/[email protected]` Edits the phone number and email address of the 1st person to be `91234567` and `[email protected]` respectively.
Expand Down Expand Up @@ -184,7 +188,7 @@ Examples:
* `list` followed by `delete 2` deletes the 2nd person in CampusConnect.
* `find n/Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.

### Adds tags to a specific person : `addtag`
### Adding tags to a specific person : `addtag`

Adds the specified person's tag.

Expand Down Expand Up @@ -255,6 +259,7 @@ Format: `undo`

* Reverts the state of CampusConnect to the one before the most recent command, if any.
* When the oldest version of CampusConnect is reached, `undo` command will cause an exception to be thrown
* Only the command that modify the data of CampusConnect can be undone. Commands such as `list` and `find` will not be undone.

### Redo a command: `redo`

Expand All @@ -263,6 +268,7 @@ Reapplies a command that was previously undone by `undo`.
Format: `redo`

* Advances CampusConnect to the state it was in before the most recent `undo` command, if any.
* Only the command that modify the data of CampusConnect can be redone. Commands such as `list` and `find` will not be redone.
* Note: If a new command (excluding `redo` or `undo`) is executed after an `undo`, the redo history is cleared, and further `redo` will not be possible.

### Clearing all entries : `clear`
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/logic/Logic.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public interface Logic {
ObservableList<Tag> getListOfCurrentTags();

/**
* Returns the user prefs' address book file path.
* Returns the user prefs' campus connect file path.
*/
Path getCampusConnectFilePath();

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import seedu.address.model.person.Person;

/**
* Adds a person to the address book.
* Adds a person to the campus connect.
*/
public class AddCommand extends Command {

public static final String COMMAND_WORD = "add";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the campus connect. "
+ "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
Expand All @@ -33,7 +33,7 @@ public class AddCommand extends Command {
+ PREFIX_TAG + "owesMoney";

public static final String MESSAGE_SUCCESS = "New person added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the campus connect";

private final Person toAdd;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import seedu.address.model.Model;

/**
* Clears the address book.
* Clears the campus connect.
*/
public class ClearCommand extends Command {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import seedu.address.model.person.Person;

/**
* Deletes a person identified using it's displayed index from the address book.
* Deletes a person identified using it's displayed index from the campus connect.
*/
public class DeleteCommand extends Command {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import seedu.address.model.tag.Tag;

/**
* Edits the details of an existing person in the address book.
* Edits the details of an existing person in the campus connect.
*/
public class EditCommand extends Command {

Expand All @@ -47,7 +47,7 @@ public class EditCommand extends Command {

public static final String MESSAGE_EDIT_PERSON_SUCCESS = "Edited Person: %1$s";
public static final String MESSAGE_NOT_EDITED = "At least one field to edit must be provided.";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book.";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the campus connect.";

private final Index index;
private final EditPersonDescriptor editPersonDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ExitCommand extends Command {

public static final String COMMAND_WORD = "exit";

public static final String MESSAGE_EXIT_ACKNOWLEDGEMENT = "Exiting Address Book as requested ...";
public static final String MESSAGE_EXIT_ACKNOWLEDGEMENT = "Exiting Campus Connect as requested ...";

@Override
public CommandResult execute(Model model) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import seedu.address.model.Model;

/**
* Lists all persons in the address book to the user.
* Lists all persons in the campus connect to the user.
*/
public class ListCommand extends Command {

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/seedu/address/model/CampusConnect.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ public void addPerson(Person p, int ind) {

/**
* Replaces the given person {@code target} in the list with {@code editedPerson}.
* {@code target} must exist in the address book.
* The person identity of {@code editedPerson} must not be the same as another existing person in the address book.
* {@code target} must exist in the campus connect.
* The person identity of {@code editedPerson} must not be the same as
* another existing person in the campus connect.
*/
public void setPerson(Person target, Person editedPerson) {
requireNonNull(editedPerson);
Expand All @@ -136,7 +137,7 @@ public void setPerson(Person target, Person editedPerson) {

/**
* Removes {@code key} from this {@code CampusConnect}.
* {@code key} must exist in the address book.
* {@code key} must exist in the campus connect.
*/
public void removePerson(Person key) {
persons.remove(key);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/model/person/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import static seedu.address.commons.util.AppUtil.checkArgument;

/**
* Represents a Person's email in the address book.
* Represents a Person's email in the CampusConnect.
* Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}
*/
public class Email {
Expand Down

0 comments on commit 255fab1

Please sign in to comment.