title: How would I set up a scoring system in a quiz app?
body: <p>I'm trying to set up a quiz of which each answer will add a certain number of points to a total score.  At the moment, I'm concerned with radio buttons.  I have set up a radiogroup and I wish for whatever Radio button selected to add to the total score.  This is only one part of my program just to note.</p>
  
  <p>When I press the button at the bottom of the xml layout file, I want the score associated with the radio button to be added to the total score.  Do you understand?</p>
  
  <p>Here's the class file for the actual xml layout file:</p>
  
  <pre><code>Public class QuestionOne extends Results {
  
      RadioButton answer1, answer2, answer3;
      Button oneNext;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.one);
  
          RadioButton answer1 = (RadioButton) findViewById(R.id.oneradio1);
          RadioButton answer2 = (RadioButton) findViewById(R.id.oneradio2);
          RadioButton answer3 = (RadioButton) findViewById(R.id.oneradio3);
  
          Button oneNext = (Button) findViewById(R.id.onenext);
  
  
      }
  
  }
  </code></pre>
  
  <p>It extends the Results class and I did this so it inherits the score integer.  Here is the score class:</p>
  
  <pre><code>public class Results extends Activity {
  
      private int score;
  
      public int getScore() {
          return score;
      }
  
      public Results(int score) {
          this.score = score;
      }
  
  }
  </code></pre>
  
  <p>I got that structure from googling and its validity is questionable I'm sure but I think I have the basic idea.  Can anyone help me out?</p>