AJ Bell Interview Question

inheritance vs composition, which would you use and why? Have you used contract testing before?