Starbucks Interview Question for Dev Leads Dev Leads
- 1of 1 vote
AnswersYou are asked to code an Android game that shows this board
+——————————+——————————+ |1 | 2| | | | | ♠ | ♣ | | +———+———+ | | | ♥ | ♠ | | +——————+———+———+——————+ | | ♦ | ♣ | | | +———+———+ | | ♥ | ♦ | | | | |3 | 4| +——————————+——————————+
Where the numbers are text but the spades, diamond, etc are graphics.
- diegum June 06, 2014 in United States for Android
The four squares in the center of the board are buttons. When you press any of these buttons, a popup shows buttons from 1 to 4. You have to click the number that makes your original button to match the quadrant whose symbol is the same.
So, in the figure, if you pressed the spades button, then you should press the button labeled 1. If you pressed the heart button then you should press 3, etc.
When you press the buttons correctly, the figure button is swapped properly so it gets in the quadrant containing that figure, and disabled for further push.
If the number button were incorrect instead, the original figure button is swapped with the figure button at the quadrant whose number you erroneously clicked.
The game finishes when all figure buttons are in their correct quadrants. Last but not least, the figure buttons are initially placed randomly.
Describe how you'd put this board in a layout that doesn't distort the figures neither in quadrants nor in buttons.
Explain how you'd code the most important portions of this game.| Report Duplicate | Flag | PURGE
Starbucks Dev Lead Dev Lead Application / UI Design
Country: United States
Interview Type: In-Person