From 3e1ae20fc0208afc64805b492a1ba6f22a24146b Mon Sep 17 00:00:00 2001 From: jemine1998 Date: Tue, 12 Feb 2019 10:53:38 +0800 Subject: [PATCH] no message --- src/seedu/addressbook/data/AddressBook.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/seedu/addressbook/data/AddressBook.java b/src/seedu/addressbook/data/AddressBook.java index 537d35c89..795ed7ee3 100644 --- a/src/seedu/addressbook/data/AddressBook.java +++ b/src/seedu/addressbook/data/AddressBook.java @@ -38,6 +38,15 @@ public void addPerson(Person toAdd) throws DuplicatePersonException { allPersons.add(toAdd); } + /*prints out name if duplicate is found*/ + + public void nameOfDuplicate (ReadOnlyPerson key) { + if (containsPerson(key)==true){ + String duplicate = "This user is already in the system"; + System.out.println(duplicate); + } + } + /** * Returns true if an equivalent person exists in the address book. */