<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Write an Android app for creating and playing a quiz competition.
<|im_end|>
<|im_start|>assistant
public class QuizApp extends Activity {

private ArrayList<QuizQuestion> questions;

public void onCreate(Bundle bundle) {
    questions = new ArrayList<QuizQuestion>();
    // other code
    // such as setting the layout 
    // and adding questions to the list
}

public void showQuestion() {
    // code to show new question
    // such as setting the text/image
    // showing the options, etc.
}

public void selectAnswer(int answerIndex) {
    // code to check if the selected answer is
    // correct or wrong
    // and show correct or wrong message
}

public void changeQuestion() {
    // code to show next question    
} 

}<|im_end|>
