Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Question.h"
- #include <string>
- #include <vector>
- #include <iostream>
- Question::Question(std::string questionText, std::vector<Answer> lstAnswers)
- {
- m_questionText = questionText;
- m_lstAnswers = lstAnswers;
- }
- bool Question::isRightAnswer(int answeredNumber)
- {
- return m_lstAnswers[answeredNumber].getisCorrectAnswer();
- }
- void Question::displayAnswerOptions()
- {
- std::cout << "Answer Choices\n";
- std::cout << "-------------------\n";
- for(std::vector<Answer>::size_type i = 0; i < m_lstAnswers.size(); i++ )
- {
- std::cout << i << ") " << m_lstAnswers[i].getAnswerText() << std::endl;
- }
- }
- void Question::displayQuestion()
- {
- std::cout << m_questionText << std::endl << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement