<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">from contact import *

class AddressBook:
    '''An address book to keep track of Contacts.'''
    
    # Attributes:
    #  list_of_contacts (list)
    #     Could be a dictionary with Contacts as the values and name as the key
    #     Could have three dictionaries with phone #, name, and address
    #     as the three keys
    
    def add_contact(self, c):
        '''Add Contact c to this address book.'''
        pass
    
    def remove_contact(self, c):
        '''Remove Contact c from this address book.
        Throw a ContactDoesNotExistException if c is not in the address book.'''
        raise ContactDoesNotExistException(c)
        # raise Exception()
    
    def find_by_name(self, s):
        '''Return the list of Contacts with name containing str s.'''
        pass
    
    def find_by_phone(self, p):
        '''Return the list fo Contacts with main or secondary phone containing
        str p.'''
        pass
    
    def find_by_address(self, a):
        '''Return the list fo Contacts with address containing str a.'''
        pass

class ContactDoesNotExistException(Exception):
    def __init__(self, c):
        self.contact = c
        
    def __str__(self):
        return repr(self.contact)

</pre></body></html>