QuestionService

protocol QuestionService

The QuestionService

  • Ask Question

    Declaration

    Swift

    func ask(_ question: Question, predefinedAnswer: String?) -> String

    Parameters

    question

    The Question that should be asked

    predefinedAnswer

    The optional predefined answer

    Return Value

    The answer

  • ask(_:) Extension method

    Ask Question

    Declaration

    Swift

    func ask(_ question: Question) -> String

    Parameters

    question

    The Question that should be asked

    Return Value

    The answer