Skip to content
Snippets Groups Projects
Commit b12e1e66 authored by Simon Barrett's avatar Simon Barrett
Browse files

Starting from here

parent 3d428160
No related branches found
No related tags found
No related merge requests found
......@@ -34,12 +34,7 @@ public class Lesson {
return lessonTitle;
}
/**
* This method also sets lesson complete to true as it
* @return String containing Lesson Text
*/
public String getLessonText() {
this.lessonCompleted = true;
return lessonText;
}
......@@ -68,6 +63,8 @@ public class Lesson {
this.quizScore = quizScore;
}
public void replace(boolean lessonCompleted, boolean quizCompleted, int quizScore){
this.lessonCompleted = lessonCompleted;
this.quizCompleted = quizCompleted;
......@@ -91,7 +88,6 @@ public class Lesson {
* @return total correct user answers
*/
public int doQuiz() {
this.quizCompleted = true;
int correctAnswers = 0;
int questionsAnswered = 0;
......
......@@ -34,6 +34,7 @@ public class QuizSystem {
// User takes the LESSON
System.out.println(chosenLesson.getLessonText());
chosenLesson.setLessonCompleted(true);
// Ask user if they want to do QUIZ
System.out.println("Would you like to do the quiz now? (y or n)");
......@@ -43,6 +44,7 @@ public class QuizSystem {
if (nextString.equals("y")) {
chosenLesson.setQuizScore(chosenLesson.doQuiz());
chosenLesson.setQuizCompleted(true);
System.out.println("Please enter your name to record that you have completed the lesson and the quiz");
userName = ScannerExtension.scanString();
System.out.println("Record of completion and Score saved under username: " + userName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment