Atlassian Interview Question

A simple question but I was expected to use OOPS well and write a quality code.