Android Open Source - dv-quiz Answer






From Project

Back to project page dv-quiz.

License

The source code is released under:

Apache License

If you think the Android project dv-quiz listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.dvorakdev.dvquiz.model;
/*from   www .ja  va  2s  .c o m*/
import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;
import com.activeandroid.annotation.Column.ForeignKeyAction;

@Table(name = "Answer")
public class Answer extends Model {
  
  @Override
  public String toString()
  {
    return this.getAnswer();
  }
  
  public Boolean isNew()
  {
    return this.getId() == null;
  }
  
  public Boolean isCorrect()
  {
    return this.equals(this.getQuestion().getCorrectAnswer());
  }
  
  @Column(name = "Question", onDelete = ForeignKeyAction.CASCADE)
  private Question question;
  
  @Column(name = "Answer")
  private String answer;

  public Question getQuestion() {
    return question;
  }

  public void setQuestion(Question question) {
    this.question = question;
  }

  public String getAnswer() {
    return answer;
  }

  public void setAnswer(String answer) {
    this.answer = answer;
  }

}




Java Source Code List

com.dvorakdev.dvquiz.AboutActivity.java
com.dvorakdev.dvquiz.CategoryFormActivity.java
com.dvorakdev.dvquiz.MainActivity.java
com.dvorakdev.dvquiz.QuizActivity.java
com.dvorakdev.dvquiz.QuizFormActivity.java
com.dvorakdev.dvquiz.QuizResultActivity.java
com.dvorakdev.dvquiz.context.dvQuizContext.java
com.dvorakdev.dvquiz.model.Answer.java
com.dvorakdev.dvquiz.model.Category.java
com.dvorakdev.dvquiz.model.Question.java
com.dvorakdev.dvquiz.model.Quiz.java
com.dvorakdev.dvquiz.reference.dvQuizReference.java
com.dvorakdev.lib.dvExpandableListAdapter.java
com.dvorakdev.lib.dvFileDialog.java
com.dvorakdev.lib.dvObjectRadioButton.java
com.dvorakdev.lib.dvUtils.java