class Container:
    """
    Container with add, remove, and is_empty methods.

    This is an abstract class that is not meant to be instantiated itself,
    but rather subclasses are to be instantiated.
    """
    def __init__(self):
        """
        Create a new Container self.

        @param Container self: this Container
        @rtype: None
        """
        self._contents = None
        raise NotImplementedError("Subclass this!")

    def add(self, obj):
        """
        Add obj to Container self.

        @param Container self: this Container
        @param object obj: object to add to self
        @rtype: None
        """
        raise NotImplementedError("Subclass this!")

    def remove(self):
        """
        Remove and return an object from Container self.

        Assume that Container self is empty.

        @param Container self: this Container.
        @rtype: object
        """
        raise NotImplementedError("Subclass this!")

    def is_empty(self):
        """
        Return whether Container self is empty.

        @param Container self: this Container
        @rtype: bool
        """
        raise NotImplementedError("Subclass this!")

    def __str__(self):
        """
        Return a user-friendly representation of the Container items

        @param Container self: this Container
        @rtype: str
        """
        items = []
        while not self.is_empty():
            items.append(self.remove())
        return type(self).__name__ + " contains the following items: " \
            + ", ".join(str(item) for item in items)


class EmptyContainerException(Exception):
    """
    Dedicated Exception to be raised when an event of removing an item
    from an empty Container occurs.

    Subclasses Exception.
    """
    def __init__(self):
        """ Initialize a new EmptyContainerException self.

        Extends Exception.__init__

        @param EmptyContainerException self: this exception
        @rtype: None
        """
        Exception.__init__(self, "Uh-oh, nothing to remove from this Container")
