Design a small animal hierarchy using interfaces and implements:
1. Define interface Animal with: name: string, sound(): string.
2. Define interface Pet extends Animal adding: owner: string.
3. Implement class Dog implements Pet with:
- name and owner as constructor params.
- sound() returns "Woof!".
Implement solve(name, owner) that creates a Dog and returns { name, owner, sound: dog.sound() }.
Sample tests