给定一个Animal类和一个Dog类，使用Python编写一个程序，使狗类从动物类继承，并添加一个bark()方法。
```python
class Animal:
    def __init__(self, name):
        self.name = name

    def speak(self):
        print(f"{self.name} makes a sound.")


class Dog(Animal):
    def bark(self):
        print(f"{self.name} barks.")

# Example usage
animal = Animal("animal")
dog = Dog("dog")

animal.speak() # "animal makes a sound."
dog.speak() # "dog makes a sound."
dog.bark() # "dog barks."
```