void ContactManager::add(Contact contact)
{
	if(phone_map.count(contact.phone)) {
		throw DuplicatePhoneException();
	}
	if(name_map.count(contact.name)) {
		throw DuplicateNameException();
	}
    phone_map[contact.phone] = contact;
    name_map[contact.name] = contact;
}
void ContactManager::add(Contact contact)
{
	if(phone_map.contains(contact.phone)) {
		throw DuplicatePhoneException();
	}
	if(name_map.contains(contact.name)) {
		throw DuplicateNameException();
	}
    phone_map.add(contact.phone, contact);
    name_map.add(contact.name, contact);
}