Commit ea663a41 authored by Andrew Binder's avatar Andrew Binder

Merge branch 'master' of gitlab.cs.wallawalla.edu:sextja/cptr142_group_project

parents c3d9f453 f57ad718
......@@ -11,7 +11,10 @@ using namespace std;
int main() {
Questions questionList;
cout << questionList.countingQuestion(2);
questionList.countingQuestion(2);
questionList.countingQuestion(2);
questionList.countingQuestion(2);
questionList.countingQuestion(2);
return 0;
}
\ No newline at end of file
......@@ -9,11 +9,15 @@
#include <cstdlib>
using namespace std;
void mainQuestionAsk(int level);
void Questions::mainQuestionAsk(int level) {
int determineQuestion(int level);
}
int Questions::determineQuestion(int level) {
return 0;
}
bool countingQuestion(int level) {
bool Questions::countingQuestion(int level) {
int countTo;
switch(level) {
case 1:
......@@ -36,17 +40,45 @@ bool countingQuestion(int level) {
else
cout << "# ";
}
cout << "How many symbols are there?";
cout << "\nHow many symbols are there? ";
cin >> answer;
if(countTo == answer) {
cout << "Good job!";
cout << "Good job!\n";
return true;
}
else
cout << "Better luck next time.";
cout << "Better luck next time.\n";
return false;
}
void addSubQuestion(int level);
void Questions::addSubQuestion(int level) {
int maxNumber;
switch(level) {
case 4:
maxNumber = rand() % 5;
break;
case 5:
maxNumber = rand() % 10;
break;
case 6:
maxNumber = rand() % 20;
break;
default:
cerr << "Please see your teacher about your current level.";
break;
}
int userAnswer, correctAnswer;
if(userAnswer == correctAnswer) {
cout << "Good job!\n";
return true;
}
else
cout << "Better luck next time.\n";
return false;
}
void wordQuestion(int level);
\ No newline at end of file
void Questions::wordQuestion(int level) {
}
\ No newline at end of file
......@@ -5,7 +5,8 @@
*/
#ifndef QUESTIONS_H
#define QUESTIONS_H
class Questions {
public:
......@@ -21,3 +22,4 @@ class Questions {
void wordQuestion(int level);
};
#endif //QUESTIONS_H
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment