Gallup interview question

Design questions over code: how would you do this with Java/C#/JS/etc?