Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.48 KB | None | 0 0
  1. package com.example.atik.lict_mcq.database.model;
  2.  
  3. import android.os.Parcel;
  4. import android.os.Parcelable;
  5.  
  6. /**
  7.  * Created by Atik on 3/27/2017.
  8.  */
  9.  
  10. public class ShowCorrectanswer implements Parcelable {
  11.     private String question;
  12.     private String answer;
  13.  
  14.     public ShowCorrectanswer(String answer, String question) {
  15.         this.answer = answer;
  16.         this.question = question;
  17.     }
  18.  
  19.     public ShowCorrectanswer() {
  20.     }
  21.  
  22.     protected ShowCorrectanswer(Parcel in) {
  23.         question = in.readString();
  24.         answer = in.readString();
  25.     }
  26.  
  27.     public static final Creator<ShowCorrectanswer> CREATOR = new Creator<ShowCorrectanswer>() {
  28.         @Override
  29.         public ShowCorrectanswer createFromParcel(Parcel in) {
  30.             return new ShowCorrectanswer(in);
  31.         }
  32.  
  33.         @Override
  34.         public ShowCorrectanswer[] newArray(int size) {
  35.             return new ShowCorrectanswer[size];
  36.         }
  37.     };
  38.  
  39.     public String getQuestion() {
  40.         return question;
  41.     }
  42.  
  43.     public void setQuestion(String question) {
  44.         this.question = question;
  45.     }
  46.  
  47.     public String getAnswer() {
  48.         return answer;
  49.     }
  50.  
  51.     public void setAnswer(String answer) {
  52.         this.answer = answer;
  53.     }
  54.  
  55.     @Override
  56.     public int describeContents() {
  57.         return 0;
  58.     }
  59.  
  60.     @Override
  61.     public void writeToParcel(Parcel parcel, int i) {
  62.         parcel.writeString(question);
  63.         parcel.writeString(answer);
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement