Amazon interview question

Threat model, Java Code Review, Standard coding question