athenahealth interview question

They asked to code a solution to a problem keeping design in mind. Like would a function be better. Do we need a class/interface/structure.