Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. package com.example.quizapp
  2.  
  3. open class Question
  4. {
  5.  
  6. private var content: String? = null
  7. private var ans1: String? = null
  8. private var ans2: String? = null
  9. private var ans3: String? = null
  10. private var ans4: String? = null
  11. private var correct: Int = 0
  12.  
  13. constructor(content: String, ans1: String, ans2: String, ans3: String,ans4: String, correct: Int) {
  14. this.content = content
  15. this.ans1 = ans1
  16. this.ans2 = ans2
  17. this.ans3 = ans3
  18. this.ans4 = ans4
  19. this.correct = correct
  20. }
  21.  
  22. fun getContent(): String? {
  23. return content
  24. }
  25.  
  26. fun setContent(content: String) {
  27. this.content = content
  28. }
  29.  
  30. fun getQ1(): String? {
  31. return ans1
  32. }
  33.  
  34. fun setQ1(ans1: String) {
  35. this.ans1 = ans1
  36. }
  37.  
  38. fun getQ2(): String? {
  39. return ans2
  40. }
  41.  
  42. fun setQ2(ans2: String) {
  43. this.ans2 = ans2
  44. }
  45.  
  46. fun getQ3(): String? {
  47. return ans3
  48. }
  49.  
  50. fun setQ3(ans3: String) {
  51. this.ans3 = ans3
  52. }
  53.  
  54. fun getQ4(): String? {
  55. return ans3
  56. }
  57.  
  58. fun setQ4(ans4: String) {
  59. this.ans4 = ans4
  60. }
  61.  
  62. fun getCorrect(): Int {
  63. return correct
  64. }
  65.  
  66. fun setCorrect(correct: Int) {
  67. this.correct = correct
  68. }
  69.  
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement