Answer

object Answer

Object for an answer

class Object
trait Matchable
class Any
Answer.type

Type members

Classlikes

case class Answer(text: String, isCorrect: Boolean)

An answer has a text and is correct or wrong

An answer has a text and is correct or wrong

Value parameters:
isCorrect

an answer is correct or wrong

text

the text of the answer

Value members

Concrete methods

def changeCorrect(isCorrect: Boolean)(answer: Answer): Answer

Change whether or not the answer is correct

Change whether or not the answer is correct

Value parameters:
answer

the answer to edit

isCorrect

the new value of correctness

Returns:

Answer

def changeText(answer: Answer, answerText: String): Answer

Change answer text

Change answer text

Value parameters:
answer

the answer to edit

answerText

a new answer text

Returns:

Answer

Make an answer correct

Make an answer correct

Returns:

Answer

Make an answer wrong

Make an answer wrong

Returns:

Answer