Skip to content

Instantly share code, notes, and snippets.

@mlcollard
Last active February 19, 2021 00:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlcollard/69b43d35fc415309a84e1b087d83364b to your computer and use it in GitHub Desktop.
Save mlcollard/69b43d35fc415309a84e1b087d83364b to your computer and use it in GitHub Desktop.
int main() {
// Midterm Exam I
Test midterm1("Midterm I",
"2021-02-25 12:15:00 -04:00",
"2021-02-25 13:30:00 -04:00");
// Give the test
if (!midterm1.giveTest()) {
std::cerr << "error: Unable to give test " << midterm1.getName()
<< " from " << midterm1.getStartTime()
<< " to " << midterm1.getStopTime() << '\n';
return 1;
}
// Collect the test
midterm1.collectTest();
// Score the test
midterm1.checkAnswers();
midterm1.scoreTest();
// Enter the test into the gradebook
int score = midterm1.getScore();
if (!midterm1.enterGrade()) {
std::cerr << "error: Unable to enter test score for " << midterm1.getName()
<< " into the gradebook\n";
return 1;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment