Nokia interview question

How would I handle different possible situations.