Self-test questions

Q1) Suppose that we want to have a quiz where the question could be to name the president as well as capital city. How can we do this with multidimensional arrays?

Q2) In our Persistence example section, we saved a continually updating string to a file so that it persisted after the app had been shut down and restarted. This is like asking the user to click on a Save button. Summoning all your knowledge of Chapter 2, Getting Started with Android, can you think of a way to save the string without saving it in the button click but just when the user quits the app?

Q3) Other than increasing the difficulty level, how could we increase the challenge of our memory game for our players?

Q4) Using the plain Android UI with the dull grey ...

Get Android Game Programming: A Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.